Search Unity

Video VideoClip support in WebGL builds

Discussion in 'Audio & Video' started by jonimikkola, Sep 17, 2017.

  1. jonimikkola

    jonimikkola

    Joined:
    Sep 19, 2015
    Posts:
    2
    Hi, just a short question:

    Do VideoClips work with VideoPlayer in WebGL builds? In this manner:
    player.clip = Resources.Load<VideoClip>(videoPath);
    ...and then play the video, but nothing happens/

    So then I googled a bit and found few posts saying that there is no VideoClip support for WebGL, is that still valid information?

    Thanks!
     
  2. jonimikkola

    jonimikkola

    Joined:
    Sep 19, 2015
    Posts:
    2
    So that seems to be the case. It makes sense if all resources are preloaded before Unity app is started in the browser. Most cases not all videos need to be preloaded anyway.
    I solved this issue by putting all videos inside StreamingAssets folder.

    edit: ...and I put the Application.streamingAssetsPath + videoFileName as the .url or VideoPlayer.
     
    Last edited: Sep 19, 2017
  3. enomi90

    enomi90

    Joined:
    Sep 18, 2017
    Posts:
    1
    Last edited: Sep 19, 2017