3ea18d80002c71ee815016b5feac0102能帮我看一下吗?还是VOD-视频点播断点续传。刚才我停止,上传了10次差不多,就从0%开始了。
我给你个新的,你用这个,替换掉你本地的1.5.5,!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=12)}([function(e,t,n){!function(n,r){e.exports=t=r()}(0,function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},o=r.lib={},i=o.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%48&255;t[r+i>>>2]|=a<<24-(r+i)%48}else for(var i=0;i<o;i+=4)t[r+i>>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%48,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],o=0;o<t;o+=4){var i=function(t){var t=t,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,t=18e3*(65535&t)+(t>>16)&r;var o=(n<<16)+t&r;return o/=4294967296,(o+=.5)(e.random()>.5?1:-1)}}(4294967296(n||e.random()));n=987654071i(),r.push(4294967296i()|0)}return new a.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%48&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%84;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%48&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%48;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this.data,r=n.words,o=n.sigBytes,i=this.blockSize,s=4i,u=o/s;u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0);var c=ui,l=e.min(4c,o);if(c){for(var f=0;f<c;f+=i)this._doProcessBlock(r,f);var d=r.splice(0,c);n.sigBytes-=l}return new a.init(d,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),d=(o.Hasher=f.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e)}return o(e,null,[{key:"detectIEVersion",value:function(){for(var e=4,t=document.createElement("div"),n=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+e+"]><![endif]--\x3e",n[0];)e++;return e>4&&e}},{key:"extend",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n]&&(e[n]=t[n])}},{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(arg)}},{key:"getFileType",value:function(e){return e=e.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(e)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(e)?"audio":/.bmp|.jpg|.jpeg|.png/.test(e)?"img":"other"}},{key:"isImage",value:function(e){return e=e.toLowerCase(),!!/.jpg|.jpeg|.png/.test(e)}},{key:"ISODateString",value:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(e){return!!/^\d+$/.test(e)}}]),e}();t.default=i},function(e,t,n){!function(r,o){e.exports=t=o(n(0))}(0,function(e){return function(t){function n(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+o+a;return(s<<i|s>>>32-i)+t}function r(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+o+a;return(s<<i|s>>>32-i)+t}function o(e,t,n,r,o,i,a){var s=e+(t^n^r)+o+a;return(s<<i|s>>>32-i)+t}function i(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+o+a;return(s<<i|s>>>32-i)+t}var a=e,s=a.lib,u=s.WordArray,c=s.Hasher,l=a.algo,f=[];!function(){for(var e=0;e<64;e++)f[e]=4294967296t.abs(t.sin(e+1))|0}();var d=l.MD5=c.extend({doReset:function(){this.hash=new u.init([1732584193,4023233417,2562383102,271733878])},doProcessBlock:function(e,t){for(var a=0;a<16;a++){var s=t+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var c=this.hash.words,l=e[t+0],d=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],v=e[t+5],y=e[t+6],=e[t+7],m=e[t+8],w=e[t+9],T=e[t+10],S=e[t+11],A=e[t+12],b=e[t+13],I=e[t+14],E=e[t+15],k=c[0],U=c[1],P=c[2],O=c[3];k=n(k,U,P,O,l,7,f[0]),O=n(O,k,U,P,d,12,f[1]),P=n(P,O,k,U,h,17,f[2]),U=n(U,P,O,k,p,22,f[3]),k=n(k,U,P,O,g,7,f[4]),O=n(O,k,U,P,v,12,f[5]),P=n(P,O,k,U,y,17,f[6]),U=n(U,P,O,k,,22,f[7]),k=n(k,U,P,O,m,7,f[8]),O=n(O,k,U,P,w,12,f[9]),P=n(P,O,k,U,T,17,f[10]),U=n(U,P,O,k,S,22,f[11]),k=n(k,U,P,O,A,7,f[12]),O=n(O,k,U,P,b,12,f[13]),P=n(P,O,k,U,I,17,f[14]),U=n(U,P,O,k,E,22,f[15]),k=r(k,U,P,O,d,5,f[16]),O=r(O,k,U,P,y,9,f[17]),P=r(P,O,k,U,S,14,f[18]),U=r(U,P,O,k,l,20,f[19]),k=r(k,U,P,O,v,5,f[20]),O=r(O,k,U,P,T,9,f[21]),P=r(P,O,k,U,E,14,f[22]),U=r(U,P,O,k,g,20,f[23]),k=r(k,U,P,O,w,5,f[24]),O=r(O,k,U,P,I,9,f[25]),P=r(P,O,k,U,p,14,f[26]),U=r(U,P,O,k,m,20,f[27]),k=r(k,U,P,O,b,5,f[28]),O=r(O,k,U,P,h,9,f[29]),P=r(P,O,k,U,,14,f[30]),U=r(U,P,O,k,A,20,f[31]),k=o(k,U,P,O,v,4,f[32]),O=o(O,k,U,P,m,11,f[33]),P=o(P,O,k,U,S,16,f[34]),U=o(U,P,O,k,I,23,f[35]),k=o(k,U,P,O,d,4,f[36]),O=o(O,k,U,P,g,11,f[37]),P=o(P,O,k,U,,16,f[38]),U=o(U,P,O,k,T,23,f[39]),k=o(k,U,P,O,b,4,f[40]),O=o(O,k,U,P,l,11,f[41]),P=o(P,O,k,U,p,16,f[42]),U=o(U,P,O,k,y,23,f[43]),k=o(k,U,P,O,w,4,f[44]),O=o(O,k,U,P,A,11,f[45]),P=o(P,O,k,U,E,16,f[46]),U=o(U,P,O,k,h,23,f[47]),k=i(k,U,P,O,l,6,f[48]),O=i(O,k,U,P,,10,f[49]),P=i(P,O,k,U,I,15,f[50]),U=i(U,P,O,k,v,21,f[51]),k=i(k,U,P,O,A,6,f[52]),O=i(O,k,U,P,p,10,f[53]),P=i(P,O,k,U,T,15,f[54]),U=i(U,P,O,k,d,21,f[55]),k=i(k,U,P,O,m,6,f[56]),O=i(O,k,U,P,E,10,f[57]),P=i(P,O,k,U,y,15,f[58]),U=i(U,P,O,k,b,21,f[59]),k=i(k,U,P,O,g,6,f[60]),O=i(O,k,U,P,S,10,f[61]),P=i(P,O,k,U,h,15,f[62]),U=i(U,P,O,k,w,21,f[63]),c[0]=c[0]+k|0,c[1]=c[1]+U|0,c[2]=c[2]+P|0,c[3]=c[3]+O|0},doFinalize:function(){var e=this.data,n=e.words,r=8this._nDataBytes,o=8e.sigBytes;n[o>>>5]|=128<<24-o%32;var i=t.floor(r/4294967296),a=r;n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this.process();for(var s=this.hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=c.clone.call(this);return e.hash=this.hash.clone(),e}});a.MD5=c.createHelper(d),a.HmacMD5=c.createHmacHelper(d)}(Math),e.MD5})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},t.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},t.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(5),s=r(a),u=n(25),c=r(u),l=n(6),f=r(l),d=n(7),h=r(d),p=function(){function e(t){o(this,e);var n=h.default.os.name,r=h.default.os.version||"",i=h.default.browser.name,a=h.default.browser.version||"",u=window.location.href,c="";u&&(c=h.default.getHost(u));var l="pc";h.default.os.ipad?l="pad":(h.default.os.iphone||h.default.os.android)&&(l="phone"),this.ri=s.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:f.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:e.getUuid(),os:n,ov:r,et:i,ev:a,uat:navigator.userAgent,app_n:c,tt:l,dm:"h5",ut:""}}return i(e,[{key:"log",value:function(e,t){t&&t.ri?(this.ri=t.ri,delete t.ri):this.ri=s.default.create(),t&&t.ut&&(this.initParam.ut=t.ut,delete t.ut),this.initParam.t=(new Date).getTime(),this.initParam.ll="20006"==e?"error":"info",this.initParam.ri=this.ri,this.initParam.e=e;var n=[];if(t)for(var r in t)n.push(r+"="+t[r]);var o=n.join("&");this.initParam.args=encodeURIComponent(""==o?"0":o);var i=[];for(var r in this.initParam)i.push(r+"="+this.initParam[r]);var a=i.join("&");if(AliyunUpload&&AliyunUpload.logTestCallback)AliyunUpload.logTestCallback(a);else{new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+a}}}],[{key:"getUuid",value:function(){var e=c.default.get("p_h5_upload_u");return e||(e=s.default.create(),c.default.set("p_h5_upload_u",e,730)),e}},{key:"getClientId",value:function(){return c.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(e){return e||(e=s.default.create()),c.default.set("p_h5_upload_clientId",e,730),e}}]),e}();t.default=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e)}return o(e,null,[{key:"create",value:function(e,t){var n,r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];if(t=t||r.length,e)for(n=0;n<e;n++)o[n]=r[0|Math.random()t];else{var i;for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",n=0;n<36;n++)o[n]||(i=0|16Math.random(),o[n]=r[19==n?3&i|8:i])}return o.join("")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"esModule",{value:!0});var r={version:"1.5.0"};t.default=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){var t=navigator.userAgent,n="other";if(e.ios)return"iOS";if(e.android)return"android";if(t.indexOf("Baiduspider")>-1)return"Baiduspider";if(t.indexOf("PlayStation")>-1)return"PS4";var r="Win32"==navigator.platform||"Windows"==navigator.platform||t.indexOf("Windows")>-1,o="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform;return o&&(n="macOS"),"X11"==navigator.platform&&!r&&!o&&(n="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(n="Linux"),r?"windows":n},a=function(){var e=navigator.userAgent,t="";return(e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1)&&(t="2000"),(e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1)&&(t="XP"),(e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1)&&(t="2003"),(e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1)&&(t="Vista"),(e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1)&&(t="7"),(e.indexOf("Windows NT 6.2")>-1||e.indexOf("Windows 8")>-1)&&(t="8"),(e.indexOf("Windows NT 6.3")>-1||e.indexOf("Windows 8.1")>-1)&&(t="8.1"),(e.indexOf("Windows NT 10")>-1||e.indexOf("Windows 10")>-1)&&(t="10"),t},s=function(e){var t=navigator.userAgent.toLowerCase();return e.chrome?"Chrome":e.firefox?"Firefox":e.safari?"Safari":e.webview?"webview":e.ie?/edge/.test(t)?"Edge":"IE":/baiduspider/.test(t)?"Baiduspider":/ucweb/.test(t)||/UCBrowser/.test(t)?"UC":/opera/.test(t)?"Opera":/ucweb/.test(t)?"UC":/360se/.test(t)?"360浏览器":/bidubrowser/.test(t)?"百度浏览器":/metasr/.test(t)?"搜狗浏览器":/lbbrowser/.test(t)?"猎豹浏览器":/micromessenger/.test(t)?"微信内置浏览器":/qqbrowser/.test(t)?"QQ浏览器":/playstation/.test(t)?"PS4浏览器":void 0},u=function(){var e={},t={},n=navigator.userAgent,r=navigator.platform,o=n.match(/Web[kK]it[/]{0,1}([\d.]+)/),u=n.match(/(Android);?[\s/]+([\d.]+)?/),c=!!n.match(/(Macintosh; Intel /),l=n.match(/(iPad).*OS\s([\d]+)/),f=n.match(/(iPod)(.*OS\s([\d]+))?/),d=!l&&n.match(/(iPhone\sOS)\s([\d]+)/),h=n.match(/(webOS|hpwOS)\s//),p=/Win\d{2}|Windows/.test(r),g=n.match(/Windows Phone ([\d.]+)/),v=h&&n.match(/TouchPad/),y=n.match(/Kindle/([\d.]+)/),=n.match(/Silk/([\d.]+)/),m=n.match(/(BlackBerry).*Version/([\d.]+)/),w=n.match(/(BB10).*Version/([\d.]+)/),T=n.match(/(RIM\sTablet\sOS)\s([\d.]+)/),S=n.match(/PlayBook/),A=n.match(/Chrome/([\d.]+)/)||n.match(/CriOS/([\d.]+)/),b=n.match(/Firefox/([\d.]+)/),I=n.match(/((?:Mobile|Tablet); rv:([\d.]+)).*Firefox/[\d.]+/),E=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident/\d.*rv:([0-9.].)/),k=!A&&n.match(/(iPhone|iPod|iPad).AppleWebKit(?!.Safari)/),U=k||n.match(/Version/([\d.]+)(^S|[^M](Mobile)[^S](Safari))/);if((t.webkit=!!o)&&(t.version=o[1]),u&&(e.android=!0,e.version=u[2]),d&&!f&&(e.ios=e.iphone=!0,e.version=d[2].replace(//g,".")),l&&(e.ios=e.ipad=!0,e.version=l[2].replace(//g,".")),f&&(e.ios=e.ipod=!0,e.version=f[3]?f[3].replace(//g,"."):null),g&&(e.wp=!0,e.version=g[1]),h&&(e.webos=!0,e.version=h[2]),v&&(e.touchpad=!0),m&&(e.blackberry=!0,e.version=m[2]),w&&(e.bb10=!0,e.version=w[2]),T&&(e.rimtabletos=!0,e.version=T[2]),S&&(t.playbook=!0),y&&(e.kindle=!0,e.version=y[1]),&&(t.silk=!0,t.version=[1]),!&&e.android&&n.match(/Kindle Fire/)&&(t.silk=!0),A&&(t.chrome=!0,t.version=A[1]),b&&(t.firefox=!0,t.version=b[1]),I&&(e.firefoxos=!0,e.version=I[1]),E&&(t.ie=!0,t.version=E[1]),U&&(c||e.ios||p||u)&&(t.safari=!0,e.ios||(t.version=U[1])),k&&(t.webview=!0),c){var P=n.match(/[\d]*[\d]*[\d]*/);P&&P.length>0&&P[0]&&(e.version=P[0].replace(//g,"."))}return e.tablet=!!(l||S||u&&!n.match(/Mobile/)||b&&n.match(/Tablet/)||E&&!n.match(/Phone/)&&n.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(u||d||h||m||w||A&&n.match(/Android/)||A&&n.match(/CriOS/([\d.]+)/)||b&&n.match(/Mobile/)||E&&n.match(/Touch/))),e.pc=!e.tablet&&!e.phone,c?e.name="macOS":p?(e.name="windows",e.version=a()):e.name=i(e),t.name=s(t),{os:e,browser:t}}(),c=function(){function e(){r(this,e)}return o(e,null,[{key:"getHost",value:function(e){var t="";if(void 0===e||null==e||""==e)return"";var n=e.indexOf("//"),r=e;n>-1&&(r=e.substring(n+2));var t=r,o=r.split("/");return o&&o.length>0&&(t=o[0]),o=t.split(":"),o&&o.length>0&&(t=o[0]),t}},{key:"os",get:function(){return u.os}},{key:"browser",get:function(){var e=u.browser;return e.name||(e.name=s()),e}}]),e}();t.default=c},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){r(this,e)}return o(e,null,[{key:"get",value:function(e,t,n,r,o){var i;n=n||function(){},"undefined"==typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("This browser does not support XMLHttpRequest.")}),i=new XMLHttpRequest,i.onreadystatechange=function(){4===i.readyState&&(200===i.status?t(i.responseText):n(i.responseText))};try{void 0===r&&(r=!0),i.open("GET",e,r),o&&(i.withCredentials=!0)}catch(e){return void n(e)}try{i.send()}catch(e){n(e)}}},{key:"post",value:function(e,t,n,r,o,i){var a;n=n||function(){},"undefined"==typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("This browser does not support XMLHttpRequest.")}),a=new XMLHttpRequest,a.onreadystatechange=function(){4===a.readyState&&(200===a.status?t(a.responseText):n(a.responseText))};try{void 0===o&&(o=!0),a.open("POST",e,o),i&&(a.withCredentials=!0)}catch(e){return void n(e)}a.setRequestHeader("Content-type","application/x-www-form-urlencoded");try{a.send(r)}catch(e){n(e)}}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(27),a=n(30),s=(n(10),function(){function e(){r(this,e)}return o(e,null,[{key:"randomUUID",value:function(){for(var e=[],t="0123456789abcdef",n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}},{key:"aliyunEncodeURI",value:function(e){var t=encodeURIComponent(e);return t=t.replace(/+/g,"%20").replace(/*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/(/g,"%28").replace(/)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(t,n,r){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");var o=[];for(var i in t)o.push(i);for(var a=o.sort(),s="",u=a.length,i=0;i<u;i++){var c=e.aliyunEncodeURI(a[i]),l=e.aliyunEncodeURI(t[a[i]]);""==s?s=c+n+l:s+=r+c+n+l}return s}},{key:"makeChangeSiga",value:function(t,n){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");return a.stringify(i("GET&"+e.aliyunEncodeURI("/")+"&"+e.aliyunEncodeURI(e.makeUTF8sort(t,"=","&")),n+"&"))}}]),e}());t.default=s},function(e,t,n){!function(r,o){e.exports=t=o(n(0))}(0,function(e){return e.enc.Utf8})},function(e,t,n){!function(r,o){e.exports=t=o(n(0))}(0,function(e){return e.enc.Hex})},function(e,t,n){e.exports=n(13)},function(e,t,n){"use strict";var r,o,i=("function"==typeof Symbol&&Symbol.iterator,n(14)),a=function(e){return e&&e.__esModule?e:{default:e}}(i),s={Vod:a.default};r=[],void 0!==(o=function(){return s}.apply(t,r))&&(e.exports=o),FileReader.prototype.readAsBinaryString||(FileReader.prototype.readAsBinaryString=function(e){var t="",n=this,r=new FileReader;r.onload=function(e){for(var o=new Uint8Array(r.result),i=o.byteLength,a=0;a<i;a++)t+=String.fromCharCode(o[a]);n.content=t,n.onload()},r.readAsArrayBuffer(e)}),window.AliyunUpload=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(15),s=n(3),u=n(16),c=r(u),l=n(18),f=r(l),d=n(24),h=r(d),p=n(4),g=r(p),v=n(1),y=r(v),=n(5),m=r(),w=n(26),T=r(w),S=n(31),A=r(S),b=n(32),I=r(b),E=(n(2),function(){function e(t){o(this,e),this.options=t,this.options.partSize=this.options.partSize||s.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||s.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress=this.options.enableUploadProgress||!0,this._ossCreditor=new Object,this._state=a.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new g.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=a.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return i(e,[{key:"init",value:function(e,t,n,r){return this._retryCount=0,!(n&&!r||!n&&r)&&(!(e&&!t||!e&&t)&&(this._ossCreditor.accessKeyId=e,this._ossCreditor.accessKeySecret=t,this._ossCreditor.securityToken=n,this._ossCreditor.expireTime=r,!0))}},{key:"addFile",value:function(e,t,n,r,o,i){if(!e)return!1;if(0==e.size)try{this.options.onUploadFailed({file:e},"EmptyFile","文件大小为0,不能上传")}catch(e){console.log(e)}for(var s=(this.options,0);s<this._uploadList.length;s++)if(this._uploadList[s].file==e)return!1;var u=new Object;if(u.file=e,u._endpoint=t,u._bucket=n,u._object=r,u.state=a.UPLOADSTATE.INIT,u.isImage=y.default.isImage(e.name),o&&(u.videoInfo=o?JSON.parse(o).Vod:{},u.userData=f.default.encode(o)),u.ri=m.default.create(),this._uploadList.push(u),!u.isImage&&this.options.enableUploadProgress){var c=this;I.default.getMd5(e,function(e,t){u.fileHash=e,u.fileMd5=t;var n=c._getCheckoutpoint(u);c.options.localCheckpoint||n?c.addFileCallback(u):c._getCheckoutpointFromCloud(u,function(e){if(e.UploadPoint){var t=JSON.parse(e.UploadPoint);1!=t.loaded&&(u.checkpoint=t.checkpoint,u.loaded=t.loaded,u.videoId=e.VideoId,c._saveCheckoutpoint(u,t.checkpoint))}c.addFileCallback(u)},function(e){try{if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){c._invalidUserId=!0;var t=e.Message+",正确账号ID(userId)请参考:https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}catch(e){console.log(e)}})})}else this.addFileCallback(u)}},{key:"addFileCallback",value:function(e){this._reportLog("20001",e,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(e)}catch(e){console.log(e)}return!0}},{key:"deleteFile",value:function(e){return!!this.cancelFile(e)&&(this._uploadList.splice(e,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(e){this.options;if(e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];if(e==this._curIndex&&t.state==a.UPLOADSTATE.UPLOADING){t.state=a.UPLOADSTATE.CANCELED;var n=this._getCheckoutpoint(t);n&&n.checkpoint&&(n=n.checkpoint),n&&this._ossUpload.cancel(),this._removeCheckoutpoint(t),this.nextUpload()}else t.state!=a.UPLOADSTATE.SUCCESS&&(t.state=a.UPLOADSTATE.CANCELED);return this._reportLog("20008",t),!0}},{key:"resumeFile",value:function(e){this.options;if(e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];return t.state==a.UPLOADSTATE.CANCELED&&(t.state=a.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(e){return this._getCheckoutpoint({file:e})}},{key:"startUpload",value:function(e){this._retryCount=0;this.options;if(this._state==a.VODSTATE.START||this._state==a.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),-1==this._curIndex)return void(this._state=a.VODSTATE.END);var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t),this._state=a.VODSTATE.START}},{key:"nextUpload",value:function(){var e=this.options;if(this._state==a.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t)}else{this._state=a.VODSTATE.END;try{e.onUploadEnd&&e.onUploadEnd(t)}catch(e){console.log(e)}}}},{key:"clear",value:function(e){for(var t=this.options,n=0,r=0;r<this._uploadList.length;r++)t.uploadList[r].state==a.UPLOADSTATE.SUCCESS&&n++,this._uploadList[r].state==e&&(t.uploadList.splice(r,1),r--);t.onClear&&t.onClear(t.uploadList.length,n)}},{key:"stopUpload",value:function(){if((this._state==a.VODSTATE.START||this._state==a.VODSTATE.FAILURE||-1==this._curIndex)&&-1!=this._curIndex){var e=this._uploadList[this._curIndex];this._state=a.VODSTATE.STOP,e.state=a.UPLOADSTATE.STOPED,this._changeState(e,a.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(e){var t=this;if(!e)return!1;var n=JSON.parse(f.default.decode(e));return!!(n.AccessKeyId&&n.AccessKeySecret&&n.SecurityToken&&n.Expiration)&&t.resumeUploadWithToken(n.AccessKeyId,n.AccessKeySecret,n.SecurityToken,n.Expiration)}},{key:"resumeUploadWithToken",value:function(e,t,n,r){this.options;if(!(e&&t&&n&&r))return!1;if(this._state!=a.VODSTATE.EXPIRE)return!1;if(-1==this._curIndex)return!1;var o="";return this._uploadList.length>this._curIndex&&(o=this._uploadList[this._curIndex]),o&&(this.init(e,t,n,r),this._state=a.VODSTATE.START,this._ossUpload=null,this._uploadCore(o,o.retry),o.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(e,t,n){if(-1==this._curIndex)return!1;if(this._state!=a.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var r=this._uploadList[this._curIndex];r.object?this._refreshSTSTokenUpload(r,e,t,n):this.setSTSToken(r,e,t,n)}}},{key:"setSTSTokenDirectlyUpload",value:function(e,t,n,r,o){if(!(t&&n&&r&&o))return console.log("accessKeyId、ccessKeySecret、securityToken and expiration should not be empty."),!1;this._ut="oss";var i=e;this.init(t,n,r,o),i.endpoint=i._endpoint,i.bucket=i._bucket,i.object=i._object,this._ossUpload=null,this._uploadCore(i,e.retry),e.retry=!1}},{key:"setSTSToken",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var o=e.videoInfo,i={accessKeyId:t,securityToken:r,accessKeySecret:n,fileName:e.file.name,title:o.Title,requestId:e.ri,region:this.options.region};o.ImageType&&(i.imageType=o.ImageType),o.ImageExt&&(i.imageExt=o.ImageExt),o.FileSize&&(i.fileSize=o.FileSize),o.Description&&(i.description=o.Description),o.CateId&&(i.cateId=o.CateId),o.Tags&&(i.tags=o.Tags),o.TemplateGroupId&&(i.templateGroupId=o.TemplateGroupId),o.StorageLocation&&(i.storageLocation=o.StorageLocation),o.CoverURL&&(i.coverUrl=o.CoverURL),o.TransCodeMode&&(i.transCodeMode=o.TransCodeMode),o.UserData&&(i.userData=o.UserData),o.WorkflowId&&(i.WorkflowId=o.WorkflowId),o.AppId&&(i.AppId=o.AppId);var s=this,u="getUploadAuth";e.videoId?(i.videoId=e.videoId,u="refreshUploadAuth"):e.isImage&&(u="getImageUploadAuth"),T.defaultu}},{key:"setUploadAuthAndAddress",value:function(e,t,n,r){if(!e||!t||!n)return!1;var o=JSON.parse(f.default.decode(t));if(!(o.AccessKeyId&&o.AccessKeySecret&&o.SecurityToken&&o.Expiration))return console.error("uploadauth is invalid"),!1;var i={},a=e;if(n){if(i=JSON.parse(f.default.decode(n)),!i.Endpoint||!i.Bucket||!i.FileName)return console.error("uploadAddress is invalid"),!1}else i.Endpoint=a.endpoint,i.Bucket=a.bucket,i.FileName=a.object;this._ut="vod",this._uploadWay="vod",this.options.region=o.Region||this.options.region,this.init(o.AccessKeyId,o.AccessKeySecret,o.SecurityToken,o.Expiration),a.endpoint=a._endpoint?a._endpoint:i.Endpoint,a.bucket=a._bucket?a._bucket:i.Bucket,a.object=a._object?a._object:i.FileName,a.region=this.options.region,r&&(a.videoId=r),this._ossUpload=null,this._uploadCore(a,e.retry),e.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;var o={accessKeyId:t,securityToken:r,accessKeySecret:n,videoId:e.object,requestId:e.ri,region:this.options.region},i=this,s="refreshUploadAuth";e.isImage&&(s="getImageUploadAuth"),T.defaults}},{key:"_upload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.options;if(e.retry=t,n.onUploadstarted&&!t)try{var r=this._getCheckoutpoint(e);r&&r.state!=a.UPLOADSTATE.UPLOADING&&(e.checkpoint=r,e.videoId=r.videoId),n.onUploadstarted(e)}catch(e){console.log(e)}}},{key:"_uploadCore",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId、AccessKeySecret、securityToken should not be null");if(e.state=a.UPLOADSTATE.UPLOADING,!this._ossUpload){e.endpoint=e.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var t=this;this._ossUpload=new c.default({bucket:e.bucket,endpoint:e.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(e,n){t._error.call(t,e,n)},oncomplete:function(e,n){t._complete.call(t,e,n)},onprogress:function(e,n,r){t._progress.call(t,e,n,r)}})}var n=y.default.getFileType(e.file.name),r=this._getCheckoutpoint(e),o="",i="";r&&r.checkpoint&&(i=r.state,o=r.videoId,r=r.checkpoint),r&&o==e.videoId&&i!=a.UPLOADSTATE.UPLOADING&&(r.file=e.file,e.checkpoint=r,r.uploadId);var s=this._adjustPartSize(e);this._reportLog("20002",e,{ft:n,fs:e.file.size,bu:e.bucket,ok:e.object,vid:e.videoId||"",fn:e.file.name,fw:null,fh:null,ps:s});var u={headers:{"x-oss-notification":e.userData?e.userData:"","x-oss-md5":e.fileMd5?e.fileMd5:""},partSize:s,parallel:this.options.parallel};this._ossUpload.upload(e,u)}},{key:"_findUploadIndex",value:function(){for(var e=-1,t=0;t<this._uploadList.length;t++)if(this._uploadList[t].state==a.UPLOADSTATE.INIT){e=t;break}return e}},{key:"_error",value:function(e,t){if("cancel"==t.name)try{this.options.onUploadCanceled(e,t)}catch(e){console.log(e)}else{if(t.message.indexOf("InvalidAccessKeyIdError")>0||"SignatureDoesNotMatchError"==t.name||"SecurityTokenExpired"==t.code||"InvalidSecurityToken.Expired"==t.code||"InvalidAccessKeyId"==t.code&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=a.VODSTATE.EXPIRE,e.state=a.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(e,t)}catch(e){console.log(e)}}return}if(("RequestTimeoutError"==t.name||"ConnectionTimeout"==t.name||"ConnectionTimeoutError"==t.name)&&this._retryTotal>this._retryCount){var n=this;return setTimeout(function(){n._uploadCore(e,!0)},1e3*n._retryDuration),void this._retryCount+此回答整理自钉群“阿里云-VOD-视频点播-技术交流(进群先看公告)”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。