mirror of
https://github.com/videojs/video.js.git
synced 2024-12-25 02:42:10 +02:00
fix: Ensures iOS can use native fullscreen (#8071)
This commit is contained in:
parent
3accbc7c73
commit
509b3d0757
@ -666,20 +666,14 @@ class Html5 extends Tech {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if fullscreen is supported on the current playback device.
|
||||
* Check if fullscreen is supported on the video el.
|
||||
*
|
||||
* @return {boolean}
|
||||
* - True if fullscreen is supported.
|
||||
* - False if fullscreen is not supported.
|
||||
*/
|
||||
supportsFullScreen() {
|
||||
if (typeof this.el_.webkitEnterFullScreen === 'function') {
|
||||
// Still needed?
|
||||
if (browser.IS_ANDROID) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return typeof this.el_.webkitEnterFullScreen === 'function';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -893,3 +893,15 @@ QUnit.test('featuresVideoFrameCallback is false for Safari DRM', function(assert
|
||||
assert.ok(true, 'skipped because webkitKeys not writable');
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('supportsFullScreen is always with `webkitEnterFullScreen`', function(assert) {
|
||||
const oldEl = tech.el_;
|
||||
|
||||
tech.el_ = {
|
||||
webkitEnterFullScreen: () => {}
|
||||
};
|
||||
|
||||
assert.ok(tech.supportsFullScreen(), 'supportsFullScreen() true with webkitEnterFullScreen');
|
||||
|
||||
tech.el_ = oldEl;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user