From 91a3b70901f643686f8ab669b622426edf2c7b53 Mon Sep 17 00:00:00 2001 From: zhouliujun <1096432931@qq.com> Date: Wed, 2 Dec 2020 11:18:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/vue-aliplayer-v2.common.js | 686 +------------------------------- lib/vue-aliplayer-v2.umd.js | 686 +------------------------------- lib/vue-aliplayer-v2.umd.min.js | 2 +- 3 files changed, 41 insertions(+), 1333 deletions(-) diff --git a/lib/vue-aliplayer-v2.common.js b/lib/vue-aliplayer-v2.common.js index b28d603..e849d8b 100644 --- a/lib/vue-aliplayer-v2.common.js +++ b/lib/vue-aliplayer-v2.common.js @@ -142,22 +142,18 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js var es6_function_name = __webpack_require__("7cfd"); -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc& +// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=3905f692& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})} var staticRenderFns = [] -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc& - -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js -var web_dom_iterable = __webpack_require__("4634"); +// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=3905f692& // EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js var es6_regexp_to_string = __webpack_require__("cc1d"); // CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - // // // @@ -182,13 +178,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); //css版本源 required: false, type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css" + default: "https://g.alicdn.com/de/prismplayer/2.9.1/skins/default/aliplayer-min.css" }, scriptSrc: { //js版本源 required: false, type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js" + default: "https://g.alicdn.com/de/prismplayer/2.9.1/aliplayer-min.js" } }, data: function data() { @@ -322,8 +318,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); init: function init() { var _this3 = this; - var linkID = 'aliplayer-min-css'; - var scriptID = 'aliplayer-min-js'; + var linkID = 'app__aliplayer-min-css'; + var scriptID = 'app__aliplayer-min-js'; var head = document.getElementsByTagName('head'); var html = document.getElementsByTagName('html'); var scriptTag = document.getElementById(scriptID); @@ -335,7 +331,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = this.cssLink; - link.id = linkID; + link.id = linkID; // link.className = linkID; + head[0].appendChild(link); } @@ -343,7 +340,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); // console.log('scriptTag'); scriptTag = document.createElement('script'); scriptTag.type = "text/javascript"; - scriptTag.id = scriptID; + scriptTag.id = scriptID; // scriptTag.className = scriptID; + scriptTag.src = this.scriptSrc; html[0].appendChild(scriptTag); } else { @@ -673,13 +671,16 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); beforeDestroy: function beforeDestroy() { //防止重复创建 this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug) - - var head = document.querySelector('head'); //移除所有的重复创建的标签 - - var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]'); - head && nodes.forEach(function (item) { - head.removeChild(item); - }); + // const head = document.querySelector('head'); + // const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`); + // (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{ + // if(index != 0) head.removeChild(item); + // }); + // const html = document.querySelector('html'); + // const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`); + // (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{ + // if(index != 0) html.removeChild(item); + // }); } }); // CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js& @@ -820,113 +821,6 @@ AliplayerV2.Player = AliplayerV2; -/***/ }), - -/***/ "1277": -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__("f341")('wks'); -var uid = __webpack_require__("4d2c"); -var Symbol = __webpack_require__("3f8b").Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), - -/***/ "17cb": -/***/ (function(module, exports, __webpack_require__) { - -var document = __webpack_require__("3f8b").document; -module.exports = document && document.documentElement; - - -/***/ }), - -/***/ "1f9e": -/***/ (function(module, exports, __webpack_require__) { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__("6117"); -var toLength = __webpack_require__("8941"); -var toAbsoluteIndex = __webpack_require__("c3a9"); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - - -/***/ }), - -/***/ "2498": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("3f8b"); -var core = __webpack_require__("da27"); -var hide = __webpack_require__("b8ea"); -var redefine = __webpack_require__("a6d5"); -var ctx = __webpack_require__("e85e"); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - /***/ }), /***/ "25ae": @@ -956,32 +850,6 @@ module.exports = function (it, S) { }; -/***/ }), - -/***/ "3038": -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), - -/***/ "3d87": -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__("d3d8").f; -var has = __webpack_require__("549d"); -var TAG = __webpack_require__("1277")('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - /***/ }), /***/ "3f8b": @@ -995,148 +863,6 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -/***/ }), - -/***/ "4634": -/***/ (function(module, exports, __webpack_require__) { - -var $iterators = __webpack_require__("96dd"); -var getKeys = __webpack_require__("7d56"); -var redefine = __webpack_require__("a6d5"); -var global = __webpack_require__("3f8b"); -var hide = __webpack_require__("b8ea"); -var Iterators = __webpack_require__("e3b3"); -var wks = __webpack_require__("1277"); -var ITERATOR = wks('iterator'); -var TO_STRING_TAG = wks('toStringTag'); -var ArrayValues = Iterators.Array; - -var DOMIterables = { - CSSRuleList: true, // TODO: Not spec compliant, should be false. - CSSStyleDeclaration: false, - CSSValueList: false, - ClientRectList: false, - DOMRectList: false, - DOMStringList: false, - DOMTokenList: true, - DataTransferItemList: false, - FileList: false, - HTMLAllCollection: false, - HTMLCollection: false, - HTMLFormElement: false, - HTMLSelectElement: false, - MediaList: true, // TODO: Not spec compliant, should be false. - MimeTypeArray: false, - NamedNodeMap: false, - NodeList: true, - PaintRequestList: false, - Plugin: false, - PluginArray: false, - SVGLengthList: false, - SVGNumberList: false, - SVGPathSegList: false, - SVGPointList: false, - SVGStringList: false, - SVGTransformList: false, - SourceBufferList: false, - StyleSheetList: true, // TODO: Not spec compliant, should be false. - TextTrackCueList: false, - TextTrackList: false, - TouchList: false -}; - -for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { - var NAME = collections[i]; - var explicit = DOMIterables[NAME]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - var key; - if (proto) { - if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); - if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = ArrayValues; - if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); - } -} - - -/***/ }), - -/***/ "4aef": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__("6cc2"); -var $export = __webpack_require__("2498"); -var redefine = __webpack_require__("a6d5"); -var hide = __webpack_require__("b8ea"); -var Iterators = __webpack_require__("e3b3"); -var $iterCreate = __webpack_require__("c264"); -var setToStringTag = __webpack_require__("3d87"); -var getPrototypeOf = __webpack_require__("d15b"); -var ITERATOR = __webpack_require__("1277")('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - /***/ }), /***/ "4d2c": @@ -1160,79 +886,6 @@ module.exports = function (it, key) { }; -/***/ }), - -/***/ "6077": -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), - -/***/ "6117": -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__("9952"); -var defined = __webpack_require__("3038"); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), - -/***/ "65c3": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__("8cac"); -var dPs = __webpack_require__("8d69"); -var enumBugKeys = __webpack_require__("d93f"); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__("6618")('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__("17cb").appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - /***/ }), /***/ "6618": @@ -1263,30 +916,6 @@ module.exports = false; module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString); -/***/ }), - -/***/ "7afe": -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__("549d"); -var toIObject = __webpack_require__("6117"); -var arrayIndexOf = __webpack_require__("1f9e")(false); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - /***/ }), /***/ "7cfd": @@ -1310,44 +939,6 @@ NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, { }); -/***/ }), - -/***/ "7d56": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__("7afe"); -var enumBugKeys = __webpack_require__("d93f"); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ "8451": -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), - -/***/ "8941": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__("a6ad"); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - /***/ }), /***/ "8cac": @@ -1360,93 +951,6 @@ module.exports = function (it) { }; -/***/ }), - -/***/ "8d69": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8"); -var anObject = __webpack_require__("8cac"); -var getKeys = __webpack_require__("7d56"); - -module.exports = __webpack_require__("f9a5") ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; - - -/***/ }), - -/***/ "96dd": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var addToUnscopables = __webpack_require__("ab19"); -var step = __webpack_require__("c8e9"); -var Iterators = __webpack_require__("e3b3"); -var toIObject = __webpack_require__("6117"); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__("4aef")(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - - -/***/ }), - -/***/ "9947": -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__("f341")('keys'); -var uid = __webpack_require__("4d2c"); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - - -/***/ }), - -/***/ "9952": -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__("6077"); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - /***/ }), /***/ "9f7e": @@ -1459,19 +963,6 @@ if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8" }); -/***/ }), - -/***/ "a6ad": -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - /***/ }), /***/ "a6d5": @@ -1510,32 +1001,6 @@ __webpack_require__("da27").inspectSource = function (it) { }); -/***/ }), - -/***/ "a9cf": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__("3038"); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), - -/***/ "ab19": -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__("1277")('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("b8ea")(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - - /***/ }), /***/ "b8ea": @@ -1551,51 +1016,6 @@ module.exports = __webpack_require__("f9a5") ? function (object, key, value) { }; -/***/ }), - -/***/ "c264": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var create = __webpack_require__("65c3"); -var descriptor = __webpack_require__("0614"); -var setToStringTag = __webpack_require__("3d87"); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__("b8ea")(IteratorPrototype, __webpack_require__("1277")('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - - -/***/ }), - -/***/ "c3a9": -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__("a6ad"); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), - -/***/ "c8e9": -/***/ (function(module, exports) { - -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; - - /***/ }), /***/ "cc1d": @@ -1629,26 +1049,6 @@ if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a } -/***/ }), - -/***/ "d15b": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__("549d"); -var toObject = __webpack_require__("a9cf"); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - /***/ }), /***/ "d3d8": @@ -1672,17 +1072,6 @@ exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defin }; -/***/ }), - -/***/ "d93f": -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - /***/ }), /***/ "da0b": @@ -1702,14 +1091,6 @@ var core = module.exports = { version: '2.6.10' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef -/***/ }), - -/***/ "e3b3": -/***/ (function(module, exports) { - -module.exports = {}; - - /***/ }), /***/ "e67d": @@ -1774,33 +1155,6 @@ module.exports = function () { }; -/***/ }), - -/***/ "e85e": -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__("8451"); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - /***/ }), /***/ "f341": diff --git a/lib/vue-aliplayer-v2.umd.js b/lib/vue-aliplayer-v2.umd.js index 8261198..b7cfe39 100644 --- a/lib/vue-aliplayer-v2.umd.js +++ b/lib/vue-aliplayer-v2.umd.js @@ -151,22 +151,18 @@ if (typeof window !== 'undefined') { // EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.function.name.js var es6_function_name = __webpack_require__("7cfd"); -// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc& +// CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"05d0d90a-vue-loader-template"}!./node_modules/_vue-loader@15.7.2@vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=3905f692& var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.playerId}})} var staticRenderFns = [] -// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=d74f17bc& - -// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js -var web_dom_iterable = __webpack_require__("4634"); +// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=3905f692& // EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/es6.regexp.to-string.js var es6_regexp_to_string = __webpack_require__("cc1d"); // CONCATENATED MODULE: ./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--12-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.0.6@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.7.2@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js& - // // // @@ -191,13 +187,13 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); //css版本源 required: false, type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css" + default: "https://g.alicdn.com/de/prismplayer/2.9.1/skins/default/aliplayer-min.css" }, scriptSrc: { //js版本源 required: false, type: [String], - default: "https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js" + default: "https://g.alicdn.com/de/prismplayer/2.9.1/aliplayer-min.js" } }, data: function data() { @@ -331,8 +327,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); init: function init() { var _this3 = this; - var linkID = 'aliplayer-min-css'; - var scriptID = 'aliplayer-min-js'; + var linkID = 'app__aliplayer-min-css'; + var scriptID = 'app__aliplayer-min-js'; var head = document.getElementsByTagName('head'); var html = document.getElementsByTagName('html'); var scriptTag = document.getElementById(scriptID); @@ -344,7 +340,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = this.cssLink; - link.id = linkID; + link.id = linkID; // link.className = linkID; + head[0].appendChild(link); } @@ -352,7 +349,8 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); // console.log('scriptTag'); scriptTag = document.createElement('script'); scriptTag.type = "text/javascript"; - scriptTag.id = scriptID; + scriptTag.id = scriptID; // scriptTag.className = scriptID; + scriptTag.src = this.scriptSrc; html[0].appendChild(scriptTag); } else { @@ -682,13 +680,16 @@ var es6_regexp_to_string = __webpack_require__("cc1d"); beforeDestroy: function beforeDestroy() { //防止重复创建 this.dispose(); //销毁播放器(防止直播播放的情况下,播放器已经销毁,而后台还在继续下载资源造成卡顿的bug) - - var head = document.querySelector('head'); //移除所有的重复创建的标签 - - var nodes = document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]'); - head && nodes.forEach(function (item) { - head.removeChild(item); - }); + // const head = document.querySelector('head'); + // const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`); + // (html && cssNodes.length > 1) && cssNodes.forEach((item, index)=>{ + // if(index != 0) head.removeChild(item); + // }); + // const html = document.querySelector('html'); + // const jsNodes = document.querySelectorAll(`script.app__aliplayer-min-js`); + // (html && jsNodes.length > 1) && jsNodes.forEach((item, index)=>{ + // if(index != 0) html.removeChild(item); + // }); } }); // CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js& @@ -829,113 +830,6 @@ AliplayerV2.Player = AliplayerV2; -/***/ }), - -/***/ "1277": -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__("f341")('wks'); -var uid = __webpack_require__("4d2c"); -var Symbol = __webpack_require__("3f8b").Symbol; -var USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function (name) { - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - - -/***/ }), - -/***/ "17cb": -/***/ (function(module, exports, __webpack_require__) { - -var document = __webpack_require__("3f8b").document; -module.exports = document && document.documentElement; - - -/***/ }), - -/***/ "1f9e": -/***/ (function(module, exports, __webpack_require__) { - -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__("6117"); -var toLength = __webpack_require__("8941"); -var toAbsoluteIndex = __webpack_require__("c3a9"); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; - - -/***/ }), - -/***/ "2498": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("3f8b"); -var core = __webpack_require__("da27"); -var hide = __webpack_require__("b8ea"); -var redefine = __webpack_require__("a6d5"); -var ctx = __webpack_require__("e85e"); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if (target) redefine(target, key, out, type & $export.U); - // export - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - /***/ }), /***/ "25ae": @@ -965,32 +859,6 @@ module.exports = function (it, S) { }; -/***/ }), - -/***/ "3038": -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - - -/***/ }), - -/***/ "3d87": -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__("d3d8").f; -var has = __webpack_require__("549d"); -var TAG = __webpack_require__("1277")('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - /***/ }), /***/ "3f8b": @@ -1004,148 +872,6 @@ var global = module.exports = typeof window != 'undefined' && window.Math == Mat if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef -/***/ }), - -/***/ "4634": -/***/ (function(module, exports, __webpack_require__) { - -var $iterators = __webpack_require__("96dd"); -var getKeys = __webpack_require__("7d56"); -var redefine = __webpack_require__("a6d5"); -var global = __webpack_require__("3f8b"); -var hide = __webpack_require__("b8ea"); -var Iterators = __webpack_require__("e3b3"); -var wks = __webpack_require__("1277"); -var ITERATOR = wks('iterator'); -var TO_STRING_TAG = wks('toStringTag'); -var ArrayValues = Iterators.Array; - -var DOMIterables = { - CSSRuleList: true, // TODO: Not spec compliant, should be false. - CSSStyleDeclaration: false, - CSSValueList: false, - ClientRectList: false, - DOMRectList: false, - DOMStringList: false, - DOMTokenList: true, - DataTransferItemList: false, - FileList: false, - HTMLAllCollection: false, - HTMLCollection: false, - HTMLFormElement: false, - HTMLSelectElement: false, - MediaList: true, // TODO: Not spec compliant, should be false. - MimeTypeArray: false, - NamedNodeMap: false, - NodeList: true, - PaintRequestList: false, - Plugin: false, - PluginArray: false, - SVGLengthList: false, - SVGNumberList: false, - SVGPathSegList: false, - SVGPointList: false, - SVGStringList: false, - SVGTransformList: false, - SourceBufferList: false, - StyleSheetList: true, // TODO: Not spec compliant, should be false. - TextTrackCueList: false, - TextTrackList: false, - TouchList: false -}; - -for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { - var NAME = collections[i]; - var explicit = DOMIterables[NAME]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - var key; - if (proto) { - if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); - if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = ArrayValues; - if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true); - } -} - - -/***/ }), - -/***/ "4aef": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__("6cc2"); -var $export = __webpack_require__("2498"); -var redefine = __webpack_require__("a6d5"); -var hide = __webpack_require__("b8ea"); -var Iterators = __webpack_require__("e3b3"); -var $iterCreate = __webpack_require__("c264"); -var setToStringTag = __webpack_require__("3d87"); -var getPrototypeOf = __webpack_require__("d15b"); -var ITERATOR = __webpack_require__("1277")('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - /***/ }), /***/ "4d2c": @@ -1169,79 +895,6 @@ module.exports = function (it, key) { }; -/***/ }), - -/***/ "6077": -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), - -/***/ "6117": -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__("9952"); -var defined = __webpack_require__("3038"); -module.exports = function (it) { - return IObject(defined(it)); -}; - - -/***/ }), - -/***/ "65c3": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__("8cac"); -var dPs = __webpack_require__("8d69"); -var enumBugKeys = __webpack_require__("d93f"); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; - -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__("6618")('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__("17cb").appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; - -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - - /***/ }), /***/ "6618": @@ -1272,30 +925,6 @@ module.exports = false; module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString); -/***/ }), - -/***/ "7afe": -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__("549d"); -var toIObject = __webpack_require__("6117"); -var arrayIndexOf = __webpack_require__("1f9e")(false); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - /***/ }), /***/ "7cfd": @@ -1319,44 +948,6 @@ NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, { }); -/***/ }), - -/***/ "7d56": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__("7afe"); -var enumBugKeys = __webpack_require__("d93f"); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), - -/***/ "8451": -/***/ (function(module, exports) { - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - - -/***/ }), - -/***/ "8941": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__("a6ad"); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - /***/ }), /***/ "8cac": @@ -1369,93 +960,6 @@ module.exports = function (it) { }; -/***/ }), - -/***/ "8d69": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("d3d8"); -var anObject = __webpack_require__("8cac"); -var getKeys = __webpack_require__("7d56"); - -module.exports = __webpack_require__("f9a5") ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; - - -/***/ }), - -/***/ "96dd": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var addToUnscopables = __webpack_require__("ab19"); -var step = __webpack_require__("c8e9"); -var Iterators = __webpack_require__("e3b3"); -var toIObject = __webpack_require__("6117"); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__("4aef")(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; - -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - - -/***/ }), - -/***/ "9947": -/***/ (function(module, exports, __webpack_require__) { - -var shared = __webpack_require__("f341")('keys'); -var uid = __webpack_require__("4d2c"); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - - -/***/ }), - -/***/ "9952": -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__("6077"); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - /***/ }), /***/ "9f7e": @@ -1468,19 +972,6 @@ if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8" }); -/***/ }), - -/***/ "a6ad": -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - - /***/ }), /***/ "a6d5": @@ -1519,32 +1010,6 @@ __webpack_require__("da27").inspectSource = function (it) { }); -/***/ }), - -/***/ "a9cf": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__("3038"); -module.exports = function (it) { - return Object(defined(it)); -}; - - -/***/ }), - -/***/ "ab19": -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__("1277")('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__("b8ea")(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - - /***/ }), /***/ "b8ea": @@ -1560,51 +1025,6 @@ module.exports = __webpack_require__("f9a5") ? function (object, key, value) { }; -/***/ }), - -/***/ "c264": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var create = __webpack_require__("65c3"); -var descriptor = __webpack_require__("0614"); -var setToStringTag = __webpack_require__("3d87"); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__("b8ea")(IteratorPrototype, __webpack_require__("1277")('iterator'), function () { return this; }); - -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - - -/***/ }), - -/***/ "c3a9": -/***/ (function(module, exports, __webpack_require__) { - -var toInteger = __webpack_require__("a6ad"); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - - -/***/ }), - -/***/ "c8e9": -/***/ (function(module, exports) { - -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; - - /***/ }), /***/ "cc1d": @@ -1638,26 +1058,6 @@ if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a } -/***/ }), - -/***/ "d15b": -/***/ (function(module, exports, __webpack_require__) { - -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__("549d"); -var toObject = __webpack_require__("a9cf"); -var IE_PROTO = __webpack_require__("9947")('IE_PROTO'); -var ObjectProto = Object.prototype; - -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; - - /***/ }), /***/ "d3d8": @@ -1681,17 +1081,6 @@ exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defin }; -/***/ }), - -/***/ "d93f": -/***/ (function(module, exports) { - -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); - - /***/ }), /***/ "da0b": @@ -1711,14 +1100,6 @@ var core = module.exports = { version: '2.6.10' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef -/***/ }), - -/***/ "e3b3": -/***/ (function(module, exports) { - -module.exports = {}; - - /***/ }), /***/ "e67d": @@ -1783,33 +1164,6 @@ module.exports = function () { }; -/***/ }), - -/***/ "e85e": -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__("8451"); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - /***/ }), /***/ "f341": diff --git a/lib/vue-aliplayer-v2.umd.min.js b/lib/vue-aliplayer-v2.umd.min.js index b89ba69..17b13d7 100644 --- a/lib/vue-aliplayer-v2.umd.min.js +++ b/lib/vue-aliplayer-v2.umd.min.js @@ -1,2 +1,2 @@ -(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-aliplayer-v2"]=e():t["vue-aliplayer-v2"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="112a")}({"0614":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"0cc1":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"112a":function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(n("e67d"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7cfd");var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:t.playerId}})},o=[],c=(n("4634"),n("cc1d"),{name:"VueAliplayerV2",props:{options:{required:!1,type:[Object],default:function(){return null}},source:{required:!1,type:[String],default:null},cssLink:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.0/skins/default/aliplayer-min.css"},scriptSrc:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.0/aliplayer-min.js"}},data:function(){return{player:null,playerId:"player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()),config:{id:null,width:"100%",autoplay:!0},events:["ready","play","pause","canplay","playing","ended","liveStreamStop","onM3u8Retry","hideBar","showBar","waiting","timeupdate","snapshoted","requestFullScreen","cancelFullScreen","error","startSeek","completeSeek"]}},watch:{source:function(){this.init()},options:{handler:function(){this.init()},deep:!0}},mounted:function(){var t=this;this.$nextTick((function(){t.init()}))},updated:function(){var t=this;this.$nextTick((function(){t.init()}))},methods:{init:function(){var t=this,e="aliplayer-min-css",n="aliplayer-min-js",r=document.getElementsByTagName("head"),i=document.getElementsByTagName("html"),o=document.getElementById(n),c=document.getElementById(e);if(!c){var a=document.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=this.cssLink,a.id=e,r[0].appendChild(a)}o?this.initPlayer():(o=document.createElement("script"),o.type="text/javascript",o.id=n,o.src=this.scriptSrc,i[0].appendChild(o)),o.addEventListener("load",(function(){t.initPlayer()}))},initPlayer:function(){var t=this;if("undefined"!=typeof window.Aliplayer){var e=this.options;if(e)for(var n in e)this.config[n]=e[n];this.source&&(this.config.source=this.source),this.config.id=this.playerId,this.player&&this.player.dispose(),this.player=Aliplayer(this.config);var r=function(e){t.player&&t.player.on(t.events[e],(function(n){t.$emit(t.events[e],n)}))};for(var i in this.events)r(i)}},getPlayer:function(){return this.player},play:function(){this.player&&this.player.play()},pause:function(){this.player&&this.player.pause()},replay:function(){this.player&&this.player.replay()},seek:function(t){this.player&&this.player.seek(t)},getCurrentTime:function(){return this.player&&this.player.getCurrentTime()},getDuration:function(){return this.player&&this.player.getDuration()},getVolume:function(){return this.player&&this.player.getVolume()},setVolume:function(t){this.player&&this.player.setVolume(t)},loadByUrl:function(t,e){this.player&&this.player.loadByUrl(t,e)},replayByVidAndPlayAuth:function(t,e){this.player&&this.player.replayByVidAndPlayAuth(t,e)},replayByVidAndAuthInfo:function(t,e,n,r,i,o){this.player&&this.player.replayByVidAndAuthInfo(t,e,n,r,i,o)},setPlayerSize:function(t,e){this.player&&this.player.setPlayerSize(t,e)},setSpeed:function(t){this.player&&this.player.setSpeed(t)},setSanpshotProperties:function(t,e,n){this.player&&this.player.setSanpshotProperties(t,e,n)},requestFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.requestFullScreen()},cancelFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.cancelFullScreen()},getIsFullScreen:function(){return this.player&&this.player.fullscreenService&&this.player.fullscreenService.getIsFullScreen()},getStatus:function(){return this.player&&this.player.getStatus()},setLiveTimeRange:function(t,e){this.player&&this.player.liveShiftSerivce&&this.player.liveShiftSerivce.setLiveTimeRange(t,e)},setRotate:function(t){this.player&&this.player.setRotate(t)},getRotate:function(){return this.player&&this.player.getRotate()},setImage:function(t){this.player&&this.player.setImage(t)},dispose:function(){this.player&&this.player.dispose()},setCover:function(t){this.player&&this.player.setCover(t)},setProgressMarkers:function(t){this.player&&this.player.setProgressMarkers(t)},setPreviewTime:function(t){this.player&&this.player.setPreviewTime(t)},getPreviewTime:function(){return this.player&&this.player.getPreviewTime()},isPreview:function(){this.player&&this.player.isPreview()},off:function(t,e){this.player&&this.player.off(t,e)}},beforeDestroy:function(){this.dispose();var t=document.querySelector("head"),e=document.querySelectorAll('script[src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-hls-min.js"]');t&&e.forEach((function(e){t.removeChild(e)}))}}),a=c;function u(t,e,n,r,i,o,c,a){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),c?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(c)},s._ssrRegister=u):i&&(u=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var s=u(a,i,o,!1,null,null,null),f=s.exports;f.install=function(t,e){e&&e.cssLink&&(f.props.cssLink.default=e.cssLink),e&&e.scriptSrc&&(f.props.scriptSrc.default=e.scriptSrc),t.component(f.name,f)},f.Player=f;var l=f;e["default"]=l},1277:function(t,e,n){var r=n("f341")("wks"),i=n("4d2c"),o=n("3f8b").Symbol,c="function"==typeof o,a=t.exports=function(t){return r[t]||(r[t]=c&&o[t]||(c?o:i)("Symbol."+t))};a.store=r},"17cb":function(t,e,n){var r=n("3f8b").document;t.exports=r&&r.documentElement},"1f9e":function(t,e,n){var r=n("6117"),i=n("8941"),o=n("c3a9");t.exports=function(t){return function(e,n,c){var a,u=r(e),s=i(u.length),f=o(c,s);if(t&&n!=n){while(s>f)if(a=u[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},2498:function(t,e,n){var r=n("3f8b"),i=n("da27"),o=n("b8ea"),c=n("a6d5"),a=n("e85e"),u="prototype",s=function(t,e,n){var f,l,p,d,y=t&s.F,h=t&s.G,v=t&s.S,m=t&s.P,g=t&s.B,S=h?r:v?r[e]||(r[e]={}):(r[e]||{})[u],b=h?i:i[e]||(i[e]={}),x=b[u]||(b[u]={});for(f in h&&(n=e),n)l=!y&&S&&void 0!==S[f],p=(l?S:n)[f],d=g&&l?a(p,r):m&&"function"==typeof p?a(Function.call,p):p,S&&c(S,f,p,t&s.U),b[f]!=p&&o(b,f,d),m&&x[f]!=p&&(x[f]=p)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"25ae":function(t,e,n){t.exports=!n("f9a5")&&!n("0cc1")((function(){return 7!=Object.defineProperty(n("6618")("div"),"a",{get:function(){return 7}}).a}))},"2ab1":function(t,e,n){var r=n("da0b");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},3038:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"3d87":function(t,e,n){var r=n("d3d8").f,i=n("549d"),o=n("1277")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},"3f8b":function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},4634:function(t,e,n){for(var r=n("96dd"),i=n("7d56"),o=n("a6d5"),c=n("3f8b"),a=n("b8ea"),u=n("e3b3"),s=n("1277"),f=s("iterator"),l=s("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},y=i(d),h=0;h";e.style.display="none",n("17cb").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+c+"document.F=Object"+i+"/script"+c),t.close(),s=t.F;while(r--)delete s[u][o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[u]=r(t),n=new a,a[u]=null,n[c]=t):n=s(),void 0===e?n:i(n,e)}},6618:function(t,e,n){var r=n("da0b"),i=n("3f8b").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"6cc2":function(t,e){t.exports=!1},"6fe0":function(t,e,n){t.exports=n("f341")("native-function-to-string",Function.toString)},"7afe":function(t,e,n){var r=n("549d"),i=n("6117"),o=n("1f9e")(!1),c=n("9947")("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,s=[];for(n in a)n!=c&&r(a,n)&&s.push(n);while(e.length>u)r(a,n=e[u++])&&(~o(s,n)||s.push(n));return s}},"7cfd":function(t,e,n){var r=n("d3d8").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,c="name";c in i||n("f9a5")&&r(i,c,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},"7d56":function(t,e,n){var r=n("7afe"),i=n("d93f");t.exports=Object.keys||function(t){return r(t,i)}},8451:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},8941:function(t,e,n){var r=n("a6ad"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"8cac":function(t,e,n){var r=n("da0b");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"8d69":function(t,e,n){var r=n("d3d8"),i=n("8cac"),o=n("7d56");t.exports=n("f9a5")?Object.defineProperties:function(t,e){i(t);var n,c=o(e),a=c.length,u=0;while(a>u)r.f(t,n=c[u++],e[n]);return t}},"96dd":function(t,e,n){"use strict";var r=n("ab19"),i=n("c8e9"),o=n("e3b3"),c=n("6117");t.exports=n("4aef")(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},9947:function(t,e,n){var r=n("f341")("keys"),i=n("4d2c");t.exports=function(t){return r[t]||(r[t]=i(t))}},9952:function(t,e,n){var r=n("6077");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"9f7e":function(t,e,n){n("f9a5")&&"g"!=/./g.flags&&n("d3d8").f(RegExp.prototype,"flags",{configurable:!0,get:n("e7a1")})},a6ad:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},a6d5:function(t,e,n){var r=n("3f8b"),i=n("b8ea"),o=n("549d"),c=n("4d2c")("src"),a=n("6fe0"),u="toString",s=(""+a).split(u);n("da27").inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,c)||i(n,c,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[c]||a.call(this)}))},a9cf:function(t,e,n){var r=n("3038");t.exports=function(t){return Object(r(t))}},ab19:function(t,e,n){var r=n("1277")("unscopables"),i=Array.prototype;void 0==i[r]&&n("b8ea")(i,r,{}),t.exports=function(t){i[r][t]=!0}},b8ea:function(t,e,n){var r=n("d3d8"),i=n("0614");t.exports=n("f9a5")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},c264:function(t,e,n){"use strict";var r=n("65c3"),i=n("0614"),o=n("3d87"),c={};n("b8ea")(c,n("1277")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:i(1,n)}),o(t,e+" Iterator")}},c3a9:function(t,e,n){var r=n("a6ad"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},c8e9:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},cc1d:function(t,e,n){"use strict";n("9f7e");var r=n("8cac"),i=n("e7a1"),o=n("f9a5"),c="toString",a=/./[c],u=function(t){n("a6d5")(RegExp.prototype,c,t,!0)};n("0cc1")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):a.name!=c&&u((function(){return a.call(this)}))},d15b:function(t,e,n){var r=n("549d"),i=n("a9cf"),o=n("9947")("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},d3d8:function(t,e,n){var r=n("8cac"),i=n("25ae"),o=n("2ab1"),c=Object.defineProperty;e.f=n("f9a5")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return c(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},d93f:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},da0b:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},da27:function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},e3b3:function(t,e){t.exports={}},e67d:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},e7a1:function(t,e,n){"use strict";var r=n("8cac");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},e85e:function(t,e,n){var r=n("8451");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},f341:function(t,e,n){var r=n("da27"),i=n("3f8b"),o="__core-js_shared__",c=i[o]||(i[o]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("6cc2")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},f9a5:function(t,e,n){t.exports=!n("0cc1")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}})})); +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-aliplayer-v2"]=t():e["vue-aliplayer-v2"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="112a")}({"0614":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"0cc1":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"112a":function(e,t,n){"use strict";var r;(n.r(t),"undefined"!==typeof window)&&(n("e67d"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n("7cfd");var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.playerId}})},o=[],a=(n("cc1d"),{name:"VueAliplayerV2",props:{options:{required:!1,type:[Object],default:function(){return null}},source:{required:!1,type:[String],default:null},cssLink:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.1/skins/default/aliplayer-min.css"},scriptSrc:{required:!1,type:[String],default:"https://g.alicdn.com/de/prismplayer/2.9.1/aliplayer-min.js"}},data:function(){return{player:null,playerId:"player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()),config:{id:null,width:"100%",autoplay:!0},events:["ready","play","pause","canplay","playing","ended","liveStreamStop","onM3u8Retry","hideBar","showBar","waiting","timeupdate","snapshoted","requestFullScreen","cancelFullScreen","error","startSeek","completeSeek"]}},watch:{source:function(){this.init()},options:{handler:function(){this.init()},deep:!0}},mounted:function(){var e=this;this.$nextTick((function(){e.init()}))},updated:function(){var e=this;this.$nextTick((function(){e.init()}))},methods:{init:function(){var e=this,t="app__aliplayer-min-css",n="app__aliplayer-min-js",r=document.getElementsByTagName("head"),i=document.getElementsByTagName("html"),o=document.getElementById(n),a=document.getElementById(t);if(!a){var s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=this.cssLink,s.id=t,r[0].appendChild(s)}o?this.initPlayer():(o=document.createElement("script"),o.type="text/javascript",o.id=n,o.src=this.scriptSrc,i[0].appendChild(o)),o.addEventListener("load",(function(){e.initPlayer()}))},initPlayer:function(){var e=this;if("undefined"!=typeof window.Aliplayer){var t=this.options;if(t)for(var n in t)this.config[n]=t[n];this.source&&(this.config.source=this.source),this.config.id=this.playerId,this.player&&this.player.dispose(),this.player=Aliplayer(this.config);var r=function(t){e.player&&e.player.on(e.events[t],(function(n){e.$emit(e.events[t],n)}))};for(var i in this.events)r(i)}},getPlayer:function(){return this.player},play:function(){this.player&&this.player.play()},pause:function(){this.player&&this.player.pause()},replay:function(){this.player&&this.player.replay()},seek:function(e){this.player&&this.player.seek(e)},getCurrentTime:function(){return this.player&&this.player.getCurrentTime()},getDuration:function(){return this.player&&this.player.getDuration()},getVolume:function(){return this.player&&this.player.getVolume()},setVolume:function(e){this.player&&this.player.setVolume(e)},loadByUrl:function(e,t){this.player&&this.player.loadByUrl(e,t)},replayByVidAndPlayAuth:function(e,t){this.player&&this.player.replayByVidAndPlayAuth(e,t)},replayByVidAndAuthInfo:function(e,t,n,r,i,o){this.player&&this.player.replayByVidAndAuthInfo(e,t,n,r,i,o)},setPlayerSize:function(e,t){this.player&&this.player.setPlayerSize(e,t)},setSpeed:function(e){this.player&&this.player.setSpeed(e)},setSanpshotProperties:function(e,t,n){this.player&&this.player.setSanpshotProperties(e,t,n)},requestFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.requestFullScreen()},cancelFullScreen:function(){this.player&&this.player.fullscreenService&&this.player.fullscreenService.cancelFullScreen()},getIsFullScreen:function(){return this.player&&this.player.fullscreenService&&this.player.fullscreenService.getIsFullScreen()},getStatus:function(){return this.player&&this.player.getStatus()},setLiveTimeRange:function(e,t){this.player&&this.player.liveShiftSerivce&&this.player.liveShiftSerivce.setLiveTimeRange(e,t)},setRotate:function(e){this.player&&this.player.setRotate(e)},getRotate:function(){return this.player&&this.player.getRotate()},setImage:function(e){this.player&&this.player.setImage(e)},dispose:function(){this.player&&this.player.dispose()},setCover:function(e){this.player&&this.player.setCover(e)},setProgressMarkers:function(e){this.player&&this.player.setProgressMarkers(e)},setPreviewTime:function(e){this.player&&this.player.setPreviewTime(e)},getPreviewTime:function(){return this.player&&this.player.getPreviewTime()},isPreview:function(){this.player&&this.player.isPreview()},off:function(e,t){this.player&&this.player.off(e,t)}},beforeDestroy:function(){this.dispose()}}),s=a;function c(e,t,n,r,i,o,a,s){var c,u="function"===typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}var u=c(s,i,o,!1,null,null,null),l=u.exports;l.install=function(e,t){t&&t.cssLink&&(l.props.cssLink.default=t.cssLink),t&&t.scriptSrc&&(l.props.scriptSrc.default=t.scriptSrc),e.component(l.name,l)},l.Player=l;var f=l;t["default"]=f},"25ae":function(e,t,n){e.exports=!n("f9a5")&&!n("0cc1")((function(){return 7!=Object.defineProperty(n("6618")("div"),"a",{get:function(){return 7}}).a}))},"2ab1":function(e,t,n){var r=n("da0b");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"3f8b":function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"4d2c":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"549d":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},6618:function(e,t,n){var r=n("da0b"),i=n("3f8b").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"6cc2":function(e,t){e.exports=!1},"6fe0":function(e,t,n){e.exports=n("f341")("native-function-to-string",Function.toString)},"7cfd":function(e,t,n){var r=n("d3d8").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n("f9a5")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},"8cac":function(e,t,n){var r=n("da0b");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},"9f7e":function(e,t,n){n("f9a5")&&"g"!=/./g.flags&&n("d3d8").f(RegExp.prototype,"flags",{configurable:!0,get:n("e7a1")})},a6d5:function(e,t,n){var r=n("3f8b"),i=n("b8ea"),o=n("549d"),a=n("4d2c")("src"),s=n("6fe0"),c="toString",u=(""+s).split(c);n("da27").inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,a)||i(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},b8ea:function(e,t,n){var r=n("d3d8"),i=n("0614");e.exports=n("f9a5")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},cc1d:function(e,t,n){"use strict";n("9f7e");var r=n("8cac"),i=n("e7a1"),o=n("f9a5"),a="toString",s=/./[a],c=function(e){n("a6d5")(RegExp.prototype,a,e,!0)};n("0cc1")((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)})):s.name!=a&&c((function(){return s.call(this)}))},d3d8:function(e,t,n){var r=n("8cac"),i=n("25ae"),o=n("2ab1"),a=Object.defineProperty;t.f=n("f9a5")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},da0b:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},da27:function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},e67d:function(e,t){(function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(r){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})})(document)},e7a1:function(e,t,n){"use strict";var r=n("8cac");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},f341:function(e,t,n){var r=n("da27"),i=n("3f8b"),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("6cc2")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},f9a5:function(e,t,n){e.exports=!n("0cc1")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))}})})); //# sourceMappingURL=vue-aliplayer-v2.umd.min.js.map \ No newline at end of file