File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -288,20 +288,31 @@ <h2><code>window.obs</code></h2>
288288 const videoWrapper = document . getElementById ( 'jsVideo' ) ;
289289
290290 if ( window . obs ?. shouldAvoidRichMedia === true ) {
291+
291292 const img = new Image ( ) ;
292293 img . src = './assets/poster.png' ;
293294 img . alt = '' ;
294295 img . width = '1500' ;
295296 img . height = '966' ;
296297 videoWrapper . appendChild ( img ) ;
298+
297299 } else {
300+
298301 const video = document . createElement ( 'video' ) ;
299302 video . src = './assets/video.min.mp4' ;
300303 video . poster = './assets/poster.png' ;
301304 video . autoplay = true ;
305+ video . loop = true ;
302306 video . muted = true ;
303307 video . controls = true ;
308+ video . preload = 'auto' ;
309+
310+ if ( window . obs ?. deliveryMode === 'cautious' ) {
311+ video . preload = 'metadata' ;
312+ }
313+
304314 videoWrapper . appendChild ( video ) ;
315+
305316 }
306317
307318 } ) ( ) ;
You can’t perform that action at this time.
0 commit comments