Search Unity

Cache video files before playing

Discussion in 'WebGL' started by shoo, Sep 25, 2018.

  1. shoo


    Nov 19, 2012
    Hello! I need to cache my video files before playback in WebGL build, becouse as I know, VideoPlayer can't play video from clips in this case.

    So it is any way to do so? My video files is about ~3mb
    How would prepare() act on WebGL, does it preload whole file or just download some buffer?
    Maybe I am able to somehow cache file in browser and then get uri of cached file and play this?

    Now I only have idea to play all videos from start to end and then stop it and then start the app, but it is childish solution I guess :/
    ina likes this.