mirror of
https://github.com/videojs/video.js.git
synced 2025-02-08 12:05:47 +02:00
fix(fs): feature detect el.matches() for IE11 (#6007)
This commit is contained in:
parent
ef49a9be7e
commit
fded30f8f8
@ -1994,8 +1994,16 @@ class Player extends Component {
|
||||
*/
|
||||
documentFullscreenChange_(e) {
|
||||
const fsApi = FullscreenApi;
|
||||
const el = this.el();
|
||||
let isFs = document[fsApi.fullscreenElement] === el;
|
||||
|
||||
this.isFullscreen(document[fsApi.fullscreenElement] === this.el() || this.el().matches(':' + fsApi.fullscreen));
|
||||
if (!isFs && el.matches) {
|
||||
isFs = el.matches(':' + fsApi.fullscreen);
|
||||
} else if (!isFs && el.msMatchesSelector) {
|
||||
isFs = el.msMatchesSelector(':' + fsApi.fullscreen);
|
||||
}
|
||||
|
||||
this.isFullscreen(isFs);
|
||||
|
||||
// If cancelling fullscreen, remove event listener.
|
||||
if (this.isFullscreen() === false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user