Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix parsing of mozVideoProjection parameter (#1412)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed Jul 17, 2019
1 parent ee5aba1 commit a22cc27
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ public void setSelectedProjection(@VideoProjectionFlags int aProjection) {

autoEnter.set(projection.endsWith("_auto"));

if (projection.startsWith("360")) {
return VIDEO_PROJECTION_360;
} else if (projection.startsWith("360s")) {
if (projection.startsWith("360s")) {
return VIDEO_PROJECTION_360_STEREO;
} else if (projection.startsWith("180")) {
return VIDEO_PROJECTION_180;
} else if (projection.startsWith("360")) {
return VIDEO_PROJECTION_360;
} else if (projection.startsWith("180lr")) {
return VIDEO_PROJECTION_180_STEREO_LEFT_RIGHT;
} else if (projection.startsWith("180tb")) {
return VIDEO_PROJECTION_180_STEREO_TOP_BOTTOM;
} else if (projection.startsWith("180")) {
return VIDEO_PROJECTION_180;
} else if (projection.startsWith("3d")) {
return VIDEO_PROJECTION_3D_SIDE_BY_SIDE;
}
Expand Down
12 changes: 10 additions & 2 deletions app/src/main/assets/web_extensions/webcompat_youtube/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,17 @@ try {
qs.delete('mozVideoProjection');
switch (currentProjection) {
case '360':
qs.set('mozVideoProjection', '360');
break;
case '360_auto':
case '360s':
case '360s_auto':
case '180':
case '180_auto':
case '180lr':
case '180lr_auto':
case '180tb':
case '180tb_auto':
qs.set('mozVideoProjection', currentProjection);
break;
default:
qs.set('mozVideoProjection', auto ? '360_auto' : '360');
break;
Expand Down

0 comments on commit a22cc27

Please sign in to comment.