1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-12 11:15:04 +02:00

fix(fs): don't set player element css props on native fullscreen (#6673)

Fixes #6640
This commit is contained in:
Gary Katsevman 2020-05-28 10:29:36 -04:00 committed by GitHub
parent 756fbfc247
commit d6b07f089e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -113,12 +113,13 @@ body.vjs-full-window {
bottom: 0;
right: 0;
}
.video-js.vjs-fullscreen {
.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
width: 100% !important;
height: 100% !important;
// Undo any aspect ratio padding for fluid layouts
padding-top: 0 !important;
}
.video-js.vjs-fullscreen.vjs-user-inactive {
cursor: none;
}

View File

@ -2077,6 +2077,9 @@ class Player extends Component {
*/
handleTechFullscreenChange_(event, data) {
if (data) {
if (data.nativeIOSFullscreen) {
this.toggleClass('vjs-ios-native-fs');
}
this.isFullscreen(data.isFullscreen);
}
}

View File

@ -626,7 +626,11 @@ class Html5 extends Tech {
this.el_.webkitPresentationMode !== 'picture-in-picture') {
this.one('webkitendfullscreen', endFn);
this.trigger('fullscreenchange', { isFullscreen: true });
this.trigger('fullscreenchange', {
isFullscreen: true,
// set a flag in case another tech triggers fullscreenchange
nativeIOSFullscreen: true
});
}
};