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

Fix parsing of mozVideoProjection parameter #1412

Merged
merged 1 commit into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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