RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

Video won't play in WebGL player #473

Closed prisonerjohn closed 3 years ago

prisonerjohn commented 3 years ago

Describe the bug Trying to load and play a video on the WebGL player and it's not working. I'm getting an error Error: video not supported (errorcode=4) color:red; but I am not sure what that means... The video plays correctly on Windows Standalone and in the Editor.

Your Setup (please complete the following information):

To Reproduce

  1. Put the video in StreamingAssets
  2. Set the path in the MediaPlayer at runtime using MediaPlayer.OpenVideoFromFile(MediaPlayer.FileLocation.RelativeToStreamingAssetsFolder, videoFile, false)
  3. Get the error Error: video not supported (errorcode=4) color:red;
  4. Cry

Logs If applicable, add error logs to help explain your problem.

Screenshots If applicable, add screenshots to help explain your problem.

Videos If applicable, add a copy of your video or the URL

https://drive.google.com/file/d/1Wrutg9agXPHMllIYszm94FwIlurdWChK/view?usp=sharing

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

THANKS!!!

AndrewRH commented 3 years ago

Yes I've seen browsers log that error before, but usually after that log the videos will play.

Have you tried building our demo scenes to WebGL?

On some browsers the video will not actually start to play unless there is some mouse interaction, and some browsers will not auto-play videos that contain an audio track.

You should also upgrade to the latest version of AVPro Video as your version is quite old and the problem may have been fixed in a later version which has better WebGL support.

Does that help?

Thanks,

prisonerjohn commented 3 years ago

Thanks @AndrewRH I just tried your demo scene with my video and it is indeed working. I guess it's something on my end.