tweb/public/783.949e247466ad3ebe82d6.ch...

2 lines
1.2 KiB
JavaScript

"use strict";(this.webpackChunktweb=this.webpackChunktweb||[]).push([[783],{7482:(e,t,i)=>{i.r(t),!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(e){const t=this.getVideoPlaybackQuality(),i=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,a=(r,l)=>{const m=this.getVideoPlaybackQuality(),s=this.mozPresentedFrames||this.mozPaintedFrames||m.totalVideoFrames-m.droppedVideoFrames;if(s>i){const i=this.mozFrameDelay||m.totalFrameDelay-t.totalFrameDelay||0,a=l-r;e(l,{presentationTime:l+1e3*i,expectedDisplayTime:l+a,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+a/1e3,presentedFrames:s,processingDuration:i}),delete this._rvfcpolyfillmap[o]}else this._rvfcpolyfillmap[o]=requestAnimationFrame((e=>a(l,e)))},o=Date.now(),r=performance.now();return this._rvfcpolyfillmap[o]=requestAnimationFrame((e=>a(r,e))),o},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(e){cancelAnimationFrame(this._rvfcpolyfillmap[e]),delete this._rvfcpolyfillmap[e]})}}]);
//# sourceMappingURL=783.949e247466ad3ebe82d6.chunk.js.map