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

Commit

Permalink
Fixes #3555 Fixes #3556 Media controls fixes (#3562)
Browse files Browse the repository at this point in the history
* Media controls forward seek tooltip fix

* Force media controls always to be flat
  • Loading branch information
keianhzo committed Jun 26, 2020
1 parent 96877ff commit 3481381
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.mozilla.geckoview.MediaElement;
import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.browser.Media;
import org.mozilla.vrbrowser.browser.SettingsStore;
import org.mozilla.vrbrowser.databinding.MediaControlsBinding;
import org.mozilla.vrbrowser.ui.views.MediaSeekBar;
import org.mozilla.vrbrowser.ui.views.VolumeControl;
Expand Down Expand Up @@ -100,12 +99,7 @@ private void initialize(Context aContext) {
placement.worldWidth = 0.5f;
placement.parentAnchorX = 0.65f;
placement.parentAnchorY = 0.4f;
placement.cylinderMapRadius = 0.0f;
placement.cylinder = SettingsStore.getInstance(getContext()).isCurvedModeEnabled();
if (mWidgetManager.getCylinderDensity() > 0) {
placement.rotationAxisY = 1.0f;
placement.rotation = (float) Math.toRadians(-7);
}
placement.cylinder = false;
if (mProjectionMenu.isVisible()) {
mProjectionMenu.hide(KEEP_WIDGET);

Expand Down Expand Up @@ -260,7 +254,7 @@ protected void initializeWidgetPlacement(WidgetPlacement aPlacement) {
aPlacement.anchorY = 0.5f;
aPlacement.parentAnchorX = 0.5f;
aPlacement.parentAnchorY = 0.0f;
aPlacement.cylinderMapRadius = 0.0f; // Do not map X when this widget uses cylindrical layout.
aPlacement.cylinder = false;
}

public void setParentWidget(int aHandle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,6 @@ private void enterVRVideo(@VideoProjectionMenuWidget.VideoProjectionFlags int aP
mMediaControlsWidget.setMedia(mFullScreenMedia);
mMediaControlsWidget.setParentWidget(mAttachedWindow.getHandle());
mMediaControlsWidget.setProjectionSelectorEnabled(true);
mMediaControlsWidget.getPlacement().cylinder = SettingsStore.getInstance(getContext()).isCurvedModeEnabled();
mWidgetManager.updateWidget(mMediaControlsWidget);
mWidgetManager.showVRVideo(mAttachedWindow.getHandle(), aProjection);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/media_controls.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
style="?attr/mediaControlsButtonStyle"
android:layout_weight="1"
android:src="@drawable/ic_icon_media_seek_forward_30"
android:tooltipText="@{String.format(@string/video_controls_seek_forward, 10)}"
android:tooltipText="@{String.format(@string/video_controls_seek_forward, 30)}"
app:tooltipDensity="@dimen/tray_tooltip_density"
app:tooltipPosition="bottom"
app:tooltipLayout="@layout/tooltip_tray"/>
Expand Down

0 comments on commit 3481381

Please sign in to comment.