修复配置全局变量bug

This commit is contained in:
Harvey Zack committed 2019-04-30 15:51:36 +08:00
1 parent b74eabc73b
commit 3de25525c4
44 files changed
+2477 -672

No files matched your search

+102
View File
@@ -0,0 +1,102 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.ArtplayerVue = factory());
}(this, function () { 'use strict';
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
var defineProperty = _defineProperty;
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
defineProperty(target, key, source[key]);
});
}
return target;
}
var objectSpread = _objectSpread;
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var artplayer = createCommonjsModule(function (module, exports) {
/*!
* artplayer.js v1.0.7
* Github: https://github.com/zhw2590582/ArtPlayer#readme
* (c) 2017-2019 Harvey Zack
* Released under the MIT License.
*/
!function(t,e){module.exports=e();}(commonjsGlobal,function(){var a=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i);}}var r=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(e){function n(t){return (n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return "function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=i=function(t){return n(t)}:e.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},i(t)}e.exports=i;});var s=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var c=function(t,e){return !e||"object"!==n(e)&&"function"!=typeof e?s(t):e},l=e(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n;}),u=e(function(n){function i(t,e){return n.exports=i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}n.exports=i;});var d=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e);};function f(){}f.prototype={on:function(t,e,n){var i=this.e||(this.e={});return (i[t]||(i[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var i=this;function r(){i.off(t,r),e.apply(n,arguments);}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),i=0,r=n.length;i<r;i++)n[i].fn.apply(n[i].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),i=n[t],r=[];if(i&&e)for(var o=0,a=i.length;o<a;o++)i[o].fn!==e&&i[o].fn._!==e&&r.push(i[o]);return r.length?n[t]=r:delete n[t],this}};var p=f,h=f;p.TinyEmitter=h;var v=e(function(t,e){t.exports=function(){function s(t){return (s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=Object.prototype.toString,a=function(t){if(void 0===t)return "undefined";if(null===t)return "null";var e,n,i,r,o,a=s(t);if("boolean"===a)return "boolean";if("string"===a)return "string";if("number"===a)return "number";if("symbol"===a)return "symbol";if("function"===a)return "GeneratorFunction"===l(t)?"generatorfunction":"function";if(e=t,Array.isArray?Array.isArray(e):e instanceof Array)return "array";if(function(t){return !(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(t))return "buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return !0}catch(t){if(-1!==t.message.indexOf("callee"))return !0}return !1}(t))return "arguments";if((n=t)instanceof Date||"function"==typeof n.toDateString&&"function"==typeof n.getDate&&"function"==typeof n.setDate)return "date";if((i=t)instanceof Error||"string"==typeof i.message&&i.constructor&&"number"==typeof i.constructor.stackTraceLimit)return "error";if((r=t)instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return "regexp";switch(l(t)){case"Symbol":return "symbol";case"Promise":return "promise";case"WeakMap":return "weakmap";case"WeakSet":return "weakset";case"Map":return "map";case"Set":return "set";case"Int8Array":return "int8array";case"Uint8Array":return "uint8array";case"Uint8ClampedArray":return "uint8clampedarray";case"Int16Array":return "int16array";case"Uint16Array":return "uint16array";case"Int32Array":return "int32array";case"Uint32Array":return "uint32array";case"Float32Array":return "float32array";case"Float64Array":return "float64array"}if("function"==typeof(o=t).throw&&"function"==typeof o.return&&"function"==typeof o.next)return "generator";switch(a=c.call(t)){case"[object Object]":return "object";case"[object Map Iterator]":return "mapiterator";case"[object Set Iterator]":return "setiterator";case"[object String Iterator]":return "stringiterator";case"[object Array Iterator]":return "arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function l(t){return t.constructor?t.constructor.name:null}functionLine truncated
});
var Artplayer = unwrapExports(artplayer);
var index = {
data: function data() {
return {
instance: null
};
},
props: {
option: {
type: Object,
required: true
},
getInstance: Function
},
mounted: function mounted() {
this.instance = new Artplayer(objectSpread({}, this.option, {
container: this.$refs.artRef
}));
this.$emit('getInstance', this.instance);
},
beforeDestroy: function beforeDestroy() {
if (this.instance && this.instance.destroy) {
this.instance.destroy();
}
},
render: function render(h) {
return h('div', {
ref: 'artRef'
}, 'render');
}
};
return index;
}));
//# sourceMappingURL=artplayer-vue.js.map