Search Unity

WEBM videos play in Chrome & Edge but not Firefox

Discussion in 'Web' started by dbyers, Apr 17, 2021.

  1. dbyers

    dbyers

    Joined:
    Jan 9, 2021
    Posts:
    2
    Hi all,

    I've published a 2d game using WebGL which runs perfectly from start to finish on Google Chrome and Microsoft Edge browsers. The game itself works reasonably well on Firefox, however some WEBM videos don't play, which stops the user in their tracks as the game becomes effectively unresponsive.

    Surprisingly, I've gotten pretty far with the development without having to use Development Builds or debugging, but I've reached the stage where I've had to upload a dev build to my server and start trying to figure out what is going on with Firefox. Problem is, these are the only errors I can see:

    Code (Boo):
    1. WebGL warning: tex(Sub)Image[23]D: Resource has no data (yet?). Uploading zeros.
    2. WebGL warning: drawElementsInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of `level_base` are not all positive. 7
    3. WebGL warning: tex(Sub)Image[23]D: Resource has no data (yet?). Uploading zeros.
    4. WebGL warning: drawElementsInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of `level_base` are not all positive. 7
    5. WebGL warning: tex(Sub)Image[23]D: Resource has no data (yet?). Uploading zeros.
    6. WebGL warning: drawElementsInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of `level_base` are not all positive. 8
    7. WebGL warning: tex(Sub)Image[23]D: Resource has no data (yet?). Uploading zeros.
    8. WebGL warning: drawElementsInstanced: TEXTURE_2D at unit 0 is incomplete: The dimensions of `level_base` are not all positive. 6
    9. After reporting 32, no further warnings will be reported for this WebGL context.
    Any ideas what I should try next?

    Are WEBM videos the best thing to use? I'm loading the videos with the following code:

    Code (CSharp):
    1. private void ButtonClicked()
    2.     {
    3. GameObject.Find("Video_DNA").GetComponent<VideoPlayer>().url = "https://blahblah.com/blahblah/dna_sequencing_good.webm";
    4. GameObject.Find("Video_DNA").GetComponent<VideoPlayer>().playbackSpeed = 1;
    5.         GameObject.Find("Video_canvasDNA").GetComponent<Canvas>().enabled = true;
    6.         GameObject.Find("StartDNA_Canvas").GetComponent<Canvas>().enabled = false;
    7.         MyVideoPlayer = GameObject.Find("Video_DNA").GetComponent<VideoPlayer>();
    8.         MyVideoPlayer.Play();
    9.         MyVideoPlayer.loopPointReached += EndReached;
    10. }
    11.  
    12.  
    13.  
    14.  
     
  2. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    547
    Disable hardware acceleration on firefox, then it will work.