I have an issue by playing videos in Unity (version 2019.4.24f1) on walls [3D object: cube]. I link a video on the wall/cube, then it automatically creates the video player component attached to the wall/cube and then I hit the play button and it starts perfectly in the non-exported simulation, but when I go to export the project (in WebGL) the video does NOT start, not even the audio.
Online I found nothing on how to do it properly. May anyone be able to resolve my issue?
I had some problems in the past using the VideoPlayer in a Mesh as well, especially with audio.
What I did was:
1- separated the Audio from the video so I had a .mp3 and a .mp4 or .avi with no audio track.
2- used the VideoPlayer on a Plane with a Camera attached just for it and generated a RawImage from it.
3- assigned the RawImage as material to the desired asset, best if it is a Plane in front of where you want to play.
4- added a AudioSource to this Plane with the sound track and made it play accordingly to the Video by code.
Maybe there are simpler ways but this worked on every platform and compiler we tested (PC, PS4, Xbox One, Switch).
Tried right now to check Transcode, but when I build & run the audio source plays as well as it’s separated from the video, like marcoxf96 suggested, but the video source does not play… I see the blank cube were I assigned the video with no video playing on it