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

Commit

Permalink
Correctly hide controller on autoselected VR video playback (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored Mar 15, 2019
1 parent ab033b4 commit dcbc58f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ private void enterVRVideo(@VideoProjectionMenuWidget.VideoProjectionFlags int aP
}
mIsInVRVideo = true;
mWidgetManager.pushBackHandler(mVRVideoBackHandler);
mProjectionMenu.setSelectedProjection(aProjection);
// Backup the placement because the same widget is reused in FullScreen & MediaControl menus
mProjectionMenuPlacement.copyFrom(mProjectionMenu.getPlacement());

Expand All @@ -512,7 +513,7 @@ private void enterVRVideo(@VideoProjectionMenuWidget.VideoProjectionFlags int aP
mWindowWidget.setVisible(false);

closeFloatingMenus();
if (mProjectionMenu.getSelectedProjection() != VideoProjectionMenuWidget.VIDEO_PROJECTION_3D_SIDE_BY_SIDE) {
if (aProjection != VideoProjectionMenuWidget.VIDEO_PROJECTION_3D_SIDE_BY_SIDE) {
mWidgetManager.setControllersVisible(false);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ private void handleClick(@VideoProjectionFlags int aVideoProjection) {
return mSelectedProjection;
}

public void setSelectedProjection(@VideoProjectionFlags int aProjection) {
mSelectedProjection = aProjection;
}

public static @VideoProjectionFlags Integer getAutomaticProjection(String aURL, AtomicBoolean autoEnter) {
if (aURL == null) {
return null;
Expand Down

0 comments on commit dcbc58f

Please sign in to comment.