This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
app/src/main/assets/web_extensions Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,10 @@ try {
331331 if ( newObjData . name === 'window.vimeo.clip_page_config' ) {
332332 if ( configObj . clip . canvas === 1 || configObj . clip . is_spatial === true ) {
333333 is360 = true ;
334+ // Detect 360 stereo videos
335+ if ( configObj . clip . title . toLowerCase ( ) . indexOf ( 'stereo' ) >= 0 ) {
336+ QS_DEFAULTS . mozVideoProjection = "360s_auto" ;
337+ }
334338 }
335339
336340 configObj . clip . canvas = 1 ;
Original file line number Diff line number Diff line change @@ -87,9 +87,10 @@ class YoutubeExtension {
8787 document . querySelector ( YT_SELECTORS . disclaimer ) ,
8888 document . querySelector ( YT_SELECTORS . embedTitle )
8989 ] ;
90- let is360 = targets . some ( ( node ) => node && node . textContent . includes ( '360' ) ) ;
90+ const is360 = targets . some ( ( node ) => node && node . textContent . includes ( '360' ) ) ;
9191 if ( is360 ) {
92- qs . set ( 'mozVideoProjection' , '360_auto' ) ;
92+ const stereo = targets . some ( ( node ) => node && node . textContent . toLowerCase ( ) . includes ( 'stereo' ) ) ;
93+ qs . set ( 'mozVideoProjection' , stereo ? '360s_auto' : '360_auto' ) ;
9394 this . updateURL ( qs ) ;
9495 this . updateVideoStyle ( ) ;
9596 logDebug ( `Video projection set to: ${ qs . get ( VIDEO_PROJECTION_PARAM ) } ` ) ;
You can’t perform that action at this time.
0 commit comments