Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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.