How to use the screenfull.off function in screenfull

To help you get started, we’ve selected a few screenfull examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vortesnail / qier-player / src / component / controls / index.js View on Github external
componentWillUnmount() {
    // 清除定时器和事件监听
    this.interval && clearInterval(this.interval);
    this.timeoutVolume && clearTimeout(this.timeoutVolume);
    this.timeoutQuality && clearTimeout(this.timeoutQuality);
    this.timeoutSetting && clearTimeout(this.timeoutSetting);
    window.removeEventListener("mouseup");
    screenfull.off("change");
  }
github umijs / hooks / src / useFullscreen / index.ts View on Github external
return () => {
      if (screenfull.isEnabled) {
        screenfull.off('change', onChange);
      }
    };
  }, [onChange]);
github zhw2590582 / ArtPlayer / packages / artplayer / src / player / fullscreenMix.js View on Github external
destroyEvents.push(() => {
            screenfull.off('change', screenfullChange);
            screenfull.off('error', screenfullError);
        });
    }
github 6502ts / 6502.ts / src / web / driver / FullscreenVideo.ts View on Github external
private _onChange(): void {
        if (!screenfull) {
            return;
        }

        if (screenfull.isFullscreen) {
            window.addEventListener('resize', this._resizeListener);
            this._adjustSizeForFullscreen();
        } else {
            this._resetSize();
            window.removeEventListener('resize', this._resizeListener);
            screenfull.off('change', this._changeListener);

            this._engaged = false;
        }
    }
github zhw2590582 / ArtPlayer / packages / artplayer / src / player / fullscreenMix.js View on Github external
destroyEvents.push(() => {
            screenfull.off('change', screenfullChange);
            screenfull.off('error', screenfullError);
        });
    }
github epiclabs-io / epic-video-comparator / src / comparator.ts View on Github external
private destroyListeners(): void {
    if (screenfull && screenfull.off) {
      screenfull.off('change', this.onFullscreenChange);
    }

    clearInterval(this.statsInterval);

    this.leftPlayer.htmlPlayer.removeEventListener('canplaythrough', this.onCanPlayThrough);
    this.leftPlayer.htmlPlayer.removeEventListener('ended', this.onEnded);
    this.leftPlayer.htmlPlayer.removeEventListener('loadstart', this.onLoadStart);
    this.leftPlayer.htmlPlayer.removeEventListener('pause', this.onPause);
    this.leftPlayer.htmlPlayer.removeEventListener('play', this.onPlay);
    this.leftPlayer.htmlPlayer.removeEventListener('seeked', this.onSeeked);
    this.leftPlayer.htmlPlayer.removeEventListener('seeking', this.onSeeking);
    this.leftPlayer.htmlPlayer.removeEventListener('timeupdate', this.onTimeUpdate);

    this.rightPlayer.htmlPlayer.removeEventListener('canplaythrough', this.onCanPlayThrough);
    this.rightPlayer.htmlPlayer.removeEventListener('ended', this.onEnded);
    this.leftPlayer.htmlPlayer.removeEventListener('pause', this.onPause);
github TaleLin / lin-cms-vue / src / components / layout / Screenfull.vue View on Github external
destroy() {
      if (screenfull.enabled) {
        screenfull.off('change', this.change)
      }
    },
  },
github captbaritone / webamp / js / components / MilkdropWindow / index.js View on Github external
componentWillUnmount() {
    screenfull.off("change", this._handleFullscreenChange);
  }