remove screenfull.on('change')

This commit is contained in:
Harvey committed 2022-09-07 15:49:51 +08:00
1 parent 489b81bb43
commit 1e460de2e8
5 files changed
+23 -7

No files matched your search

@@ -9,8 +9,6 @@ export default function fullscreenMix(art) {
} = art;
const nativeScreenfull = (art) => {
screenfull.on('change', () => art.emit('fullscreen', screenfull.isFullscreen));
def(art, 'fullscreen', {
get() {
return screenfull.isFullscreen;
+1 -2
View File
@@ -8,7 +8,6 @@ import {
escape,
remove,
append,
isMobile,
createElement,
} from './utils';
import Component from './utils/component';
@@ -23,7 +22,7 @@ export default class Subtitle extends Component {
this.init(art.option.subtitle);
art.on('fullscreen', (state) => {
if (!this.url || !isMobile) return;
if (!this.url) return;
const { $video } = this.art.template;
if (state && $video.webkitDisplayingFullscreen) {
this.createTrack('subtitles', this.url);