mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
update deps
This commit is contained in:
1 parent
17ece4c0c8
commit
0aabb42db3
222 files changed
+2791
-2603
No files matched your search
@@ -5,4 +5,4 @@
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e,r,n,s){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[n]&&a[n],u=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,r){if(!u[e]){if(!t[e]){var s="function"==typeof a[n]&&a[n];if(!r&&s)return s(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var h=Error("Cannot find module '"+e+"'");throw h.code="MODULE_NOT_FOUND",h}d.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},d.cache={};var f=u[e]=new c.Module(e);t[e][0].call(f.exports,d,f,f.exports,this)}return u[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=u,c.parent=o,c.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var h=0;h<e.length;h++)c(e[h]);if(r){var f=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({c4SNP:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var s=t("@swc/helpers/_/_async_to_generator"),a=t("@swc/helpers/_/_ts_generator"),o=t("@webav/av-cliper");function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,u=e.option,l=e.constructor.utils,c=l.createElement,h=l.def,f=c("canvas"),d=f.getContext("2d"),p=null,m=null,_=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay};function b(){_&&(clearInterval(_),_=null),m&&(m.stop(),m=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,s._)(function(){var t,o,u,l;function c(){return h.apply(this,arguments)}function h(){return(h=(0,s._)(function(){var s,c,h,f,_,g,w,S;return(0,a._)(this,function(a){switch(a.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-l,l=c,null!==y?(t=1e6*y,y=null,u=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(_=(f=a.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===_)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===_&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),u?u=!1:(null==w?void 0:null===(s=w[0])||void 0===s?void 0:s.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(m=r.createBufferSource()).buffer=S,m.connect(n),m.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),o=Math.max(r.currentTime,o),m.start(o),o+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,a._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,o=0,u=!0,l=performance.now(),b(),w(),v.playing=!0,v.paused=!1,_=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return E.apply(this,arguments)}function E(){return(E=(0,s._)(function(t){var e;return(0,a._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function U(){var t,r=null===(t=e.template)||void 0===t?void 0:t.$player;if(r&&!u.autoSize){var n=f.videoWidth/f.videoHeight,s=r.clientWidth,a=r.clientHeight,o=0,l=0;s/a>n?o=(s-a*n)/2:l=(a-s/n)/2,Object.assign(f.style,{padding:"".concat(l,"px ").concat(o,"px")})}}function T(){return(T=(0,s._)(function(){var r,n,s;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,(0,o.Combinator).isSupported()];case 1:if(!a.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:u.muted,volume:u.volume,autoplay:u.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return a.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(u.url)];case 4:if(!(r=a.sent()).body)throw Error("No response body");return p=new o.MP4Clip(r.body,t),[3,6];case 5:throw n=a.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((s=a.sent()).duration/1e6),videoWidth:s.width,videoHeight:s.height}),f.width=v.videoWidth,f.height=v.videoHeight,[4,x(.1)];case 8:return a.sent(),U(),e.emit("videoLine truncated
|
||||
!function(t,e,r,n,s,a,o,l){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof u[n]&&u[n],h=c.i||{},f=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(e,r){if(!f[e]){if(!t[e]){if(s[e])return s[e];var a="function"==typeof u[n]&&u[n];if(!r&&a)return a(e,!0);if(c)return c(e,!0);if(d&&"string"==typeof e)return d(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}h.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},h.cache={};var l=f[e]=new p.Module(e);t[e][0].call(l.exports,h,l,l.exports,u)}return f[e].exports;function h(t){var e=h.resolve(t);return!1===e?{}:p(e)}}p.isParcelRequire=!0,p.Module=function(t){this.id=t,this.bundle=p,this.require=d,this.exports={}},p.modules=t,p.cache=f,p.parent=c,p.distDir=void 0,p.publicUrl=void 0,p.devServer=void 0,p.i=h,p.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return u[n]}}),u[n]=p;for(var _=0;_<e.length;_++)p(e[_]);if(r){var m=p(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m})}}({c4SNP:[function(t,e,r,n){var s=t("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"default",function(){return u});var a=t("@swc/helpers/_/_async_to_generator"),o=t("@swc/helpers/_/_ts_generator"),l=t("@webav/av-cliper");function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var r,n,s=e.option,u=e.constructor.utils,c=u.createElement,h=u.def,f=c("canvas"),d=f.getContext("2d"),p=null,_=null,m=null,y=null,g=0,v={playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay};function b(){m&&(clearInterval(m),m=null),_&&(_.stop(),_=null)}function w(){if(n){var t=v.muted?0:v.volume;n.gain.setValueAtTime(t,r.currentTime)}}function S(){return(S=(0,a._)(function(){var t,s,l,u;function c(){return h.apply(this,arguments)}function h(){return(h=(0,a._)(function(){var a,c,h,f,m,g,w,S;return(0,o._)(this,function(o){switch(o.label){case 0:if(!v.playing)return[2];return h=(c=performance.now())-u,u=c,null!==y?(t=1e6*y,y=null,l=!0):t+=1e3*h*v.playbackRate,v.currentTime=t/1e6,[4,p.tick(Math.round(t))];case 1:if(m=(f=o.sent()).state,g=f.video,w=f.audio,e.emit("video:timeupdate",{type:"timeupdate"}),"done"===m)return b(),v.ended=!0,v.playing=!1,v.paused=!0,e.emit("video:ended",{type:"ended"}),[2];return g&&"success"===m&&(d.clearRect(0,0,v.videoWidth,v.videoHeight),d.drawImage(g,0,0,v.videoWidth,v.videoHeight),g.close()),l?l=!1:(null==w||null==(a=w[0])?void 0:a.length)&&((S=r.createBuffer(2,w[0].length,48e3)).copyToChannel(w[0],0),S.copyToChannel(w[1],1),(_=r.createBufferSource()).buffer=S,_.connect(n),_.playbackRate.setValueAtTime(v.playbackRate,r.currentTime),s=Math.max(r.currentTime,s),_.start(s),s+=S.duration/v.playbackRate),[2]}})})).apply(this,arguments)}return(0,o._)(this,function(e){return r||(n=(r=new AudioContext).createGain()).connect(r.destination),t=1e6*v.currentTime,s=0,l=!0,u=performance.now(),b(),w(),v.playing=!0,v.paused=!1,m=setInterval(c,1e3/60),[2]})})).apply(this,arguments)}function x(t){return U.apply(this,arguments)}function U(){return(U=(0,a._)(function(t){var e;return(0,o._)(this,function(r){switch(r.label){case 0:return[4,p.tick(1e6*t)];case 1:return(e=r.sent().video)&&(d.clearRect(0,0,f.width,f.height),d.drawImage(e,0,0,f.width,f.height),e.close()),[2]}})})).apply(this,arguments)}function E(){var t,r=null==(t=e.template)?void 0:t.$player;if(r&&!s.autoSize){var n=f.videoWidth/f.videoHeight,a=r.clientWidth,o=r.clientHeight,l=0,u=0;a/o>n?l=(a-o*n)/2:u=(o-a/n)/2,Object.assign(f.style,{padding:"".concat(u,"px ").concat(l,"px")})}}function k(){return(k=(0,a._)(function(){var r,n,a;return(0,o._)(this,function(o){switch(o.label){case 0:return[4,l.Combinator.isSupported()];case 1:if(!o.sent())throw e.notice.show="WebAV is not supported",Error("WebAV is not supported");b(),Object.assign(v,{playing:!1,duration:0,videoWidth:0,videoHeight:0,currentTime:0,playbackRate:1,paused:!0,ended:!1,readyState:0,buffered:0,muted:s.muted,volume:s.volume,autoplay:s.autoplay}),p&&(p.destroy(),e.emit("video:abort",{type:"abort"}),e.emit("video:emptied",{type:"emptied"})),o.label=2;case 2:return o.trys.push([2,5,,6]),[4,Promise.resolve()];case 3:return o.sent(),v.readyState=1,e.emit("video:loadstart",{type:"loadstart"}),[4,fetch(s.url)];case 4:if(!(r=o.sent()).body)throw Error("No response body");return p=new(0,l.MP4Clip)(r.body,t),[3,6];case 5:throw n=o.sent(),v.readyState=0,e.emit("video:error",n),n;case 6:return[4,p.ready];case 7:return Object.assign(v,{readyState:4,duration:Math.round((a=o.sent()).duration/1e6),videoWidth:a.width,videoHeight:a.height}),f.width=v.videoWLine truncated
|
||||
Reference in new issue
Block a user