mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Backed out changeset f3653a89b841 (bug 842782)
This commit is contained in:
parent
2bdbd85010
commit
53ed0137ec
@ -1234,37 +1234,12 @@
|
||||
},
|
||||
|
||||
onFullscreenChange() {
|
||||
this.updateOrientationState(this.isVideoInFullScreen());
|
||||
if (this.isVideoInFullScreen()) {
|
||||
Utils._hideControlsTimeout = setTimeout(this._hideControlsFn, this.HIDE_CONTROLS_TIMEOUT_MS);
|
||||
}
|
||||
this.setFullscreenButtonState();
|
||||
},
|
||||
|
||||
updateOrientationState(lock) {
|
||||
if (!this.video.mozOrientationLockEnabled) {
|
||||
return;
|
||||
}
|
||||
if (lock) {
|
||||
if (this.video.mozIsOrientationLocked) {
|
||||
return;
|
||||
}
|
||||
let dimenDiff = this.video.videoWidth - this.video.videoHeight;
|
||||
if (dimenDiff > 0) {
|
||||
this.video.mozIsOrientationLocked = window.screen.mozLockOrientation("landscape");
|
||||
} else if (dimenDiff < 0) {
|
||||
this.video.mozIsOrientationLocked = window.screen.mozLockOrientation("portrait");
|
||||
} else {
|
||||
this.video.mozIsOrientationLocked = window.screen.mozLockOrientation(window.screen.orientation);
|
||||
}
|
||||
} else {
|
||||
if (this.video.mozIsOrientationLocked) {
|
||||
window.screen.mozUnlockOrientation();
|
||||
this.video.mozIsOrientationLocked = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
clickToPlayClickHandler(e) {
|
||||
if (e.button != 0) {
|
||||
return;
|
||||
@ -1861,7 +1836,6 @@
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
this.Utils.terminateEventListeners();
|
||||
this.Utils.updateOrientationState(false);
|
||||
// randomID used to be a <field>, which meant that the XBL machinery
|
||||
// undefined the property when the element was unbound. The code in
|
||||
// this file actually depends on this, so now that randomID is an
|
||||
|
Loading…
Reference in New Issue
Block a user