# 360 Video Dome Video Caching?

**URL:** https://forum.babylonjs.com/t/360-video-dome-video-caching/24033
**Category:** Questions
**Created:** [September 23, 2021, 2:26pm UTC](https://forum.babylonjs.com/t/360-video-dome-video-caching/24033 "2021-09-23T14:26:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Paul\_Ksi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/paul_ksi/32/17431_2.png) [@Paul\_Ksi](https://forum.babylonjs.com/u/Paul_Ksi)
#### Post date: [September 23, 2021, 2:26pm UTC](https://forum.babylonjs.com/t/360-video-dome-video-caching/24033/1 "2021-09-23T14:26:57Z")

</div>

Hello, i have very large 360 video ~500mb, i need to show and control it, move to a particular time, i got the time control part, but sometimes it lags, how to cache / buffer large 360 video before playback?  
Is there any example?  
Thank you!

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [September 23, 2021, 2:45pm UTC](https://forum.babylonjs.com/t/360-video-dome-video-caching/24033/2 "2021-09-23T14:45:29Z")

</div>

The video dome is using an HTML video element under the hood. If the browser caches it, we cache it as well.  
I assume you want to play while it buffers, but if it is possible to download the entire video beforehand (might create a bit of extra traffic on your server) you can download the video, store it locally (in indexedDB, for example) and load it using a blob. Then you guarantee that the video is fully loaded before it starts.

---

<div class="post-metadata">

### Author: ![Paul\_Ksi](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/paul_ksi/32/17431_2.png) [@Paul\_Ksi](https://forum.babylonjs.com/u/Paul_Ksi)
#### Post date: [September 24, 2021, 10:52am UTC](https://forum.babylonjs.com/t/360-video-dome-video-caching/24033/3 "2021-09-24T10:52:23Z")

</div>

Can you provide any example? Thanks!

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [September 24, 2021, 12:30pm UTC](https://forum.babylonjs.com/t/360-video-dome-video-caching/24033/4 "2021-09-24T12:30:12Z")

</div>

There are a few examples on the web:

[https://mdn.github.io/learning-area/javascript/apis/client-side-storage/cache-sw/video-store-offline/](https://mdn.github.io/learning-area/javascript/apis/client-side-storage/cache-sw/video-store-offline/)

> <https://stackoverflow.com/questions/41916875/is-it-possible-to-cache-an-entire-html5-video-using-the-service-worker-api-for-o>

And the best (good read!) [Client-side storage - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Client-side_storage)
