- Home /
How to play videos in WebGL?
Hi, I use Unity 5.6.2 and the new videoplayer object, but I can't get the video to play in a WebGL build. I have tried multiple video formats and methods and searched everywhere, but can't find a solution. How do you play videos in WebGL with the video player component?
Hi, any answer for this? I have the same issue, play a video in a webgl exported project.
You have to use URL video. Copy your video into a folder called Strea$$anonymous$$gAssets then assign the url of that streamed asset to the VideoPlayer.url
Hi m$$anonymous$$lein, thx for you answer. I create the folder and use this function to play the movie:
if ( System.IO.File.Exists (Application.strea$$anonymous$$gAssetsPath + "/INTRO_SESI.$$anonymous$$OV")) {
videoPlayer.url = System.IO.Path.Combine (Application.strea$$anonymous$$gAssetsPath,"/INTRO_SESI.$$anonymous$$OV");
videoPlayer.Prepare ();
videoPlayer.Play ();
Debug.Log ("FileExists");
}
else{
Debug.Log ("FileDontExists");
}
but the video still not play. If you can help me I glad you so much. Thx
Answer by dunkelkaiser86 · Sep 02, 2017 at 06:38 AM
You already tried using URL Video? VideoPlayer.url = "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4"; VideoPlayer.Play()
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
VP8 DllNotFoundException: vpx.dll WebM.WebMEncoder Unity5 0 Answers
Handheld.PlayFullScreenMovie memory leak? 1 Answer
How to play video on WEBGL 0 Answers