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

Commit a22cc27

Browse files
MortimerGorobluemarvin
authored andcommitted
Fix parsing of mozVideoProjection parameter (#1412)
1 parent ee5aba1 commit a22cc27

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

‎app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/VideoProjectionMenuWidget.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,16 @@ public void setSelectedProjection(@VideoProjectionFlags int aProjection) {
145145

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

148-
if (projection.startsWith("360")) {
149-
return VIDEO_PROJECTION_360;
150-
} else if (projection.startsWith("360s")) {
148+
if (projection.startsWith("360s")) {
151149
return VIDEO_PROJECTION_360_STEREO;
152-
} else if (projection.startsWith("180")) {
153-
return VIDEO_PROJECTION_180;
150+
} else if (projection.startsWith("360")) {
151+
return VIDEO_PROJECTION_360;
154152
} else if (projection.startsWith("180lr")) {
155153
return VIDEO_PROJECTION_180_STEREO_LEFT_RIGHT;
156154
} else if (projection.startsWith("180tb")) {
157155
return VIDEO_PROJECTION_180_STEREO_TOP_BOTTOM;
156+
} else if (projection.startsWith("180")) {
157+
return VIDEO_PROJECTION_180;
158158
} else if (projection.startsWith("3d")) {
159159
return VIDEO_PROJECTION_3D_SIDE_BY_SIDE;
160160
}

‎app/src/main/assets/web_extensions/webcompat_youtube/main.js‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,17 @@ try {
9999
qs.delete('mozVideoProjection');
100100
switch (currentProjection) {
101101
case '360':
102-
qs.set('mozVideoProjection', '360');
103-
break;
104102
case '360_auto':
103+
case '360s':
104+
case '360s_auto':
105+
case '180':
106+
case '180_auto':
107+
case '180lr':
108+
case '180lr_auto':
109+
case '180tb':
110+
case '180tb_auto':
111+
qs.set('mozVideoProjection', currentProjection);
112+
break;
105113
default:
106114
qs.set('mozVideoProjection', auto ? '360_auto' : '360');
107115
break;

0 commit comments

Comments
 (0)