Merge branch 'dev_v1.2.1'

This commit is contained in:
zhouliujun 2020-07-07 16:55:49 +08:00
commit ee9798cbb1
3 changed files with 34 additions and 24 deletions

View File

@ -142,12 +142,12 @@ 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/src/main.vue?vue&type=template&id=3211d44f&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.id}})}
// 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/src/main.vue?vue&type=template&id=f75253da&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.config.id}})}
var staticRenderFns = []
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=3211d44f&
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=f75253da&
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("4634");
@ -181,7 +181,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
id: {
required: false,
type: [String],
default: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase())
default: null
},
cssLink: {
//css版本源
@ -201,7 +201,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
player: null,
//播放器实例
config: {
id: null,
id: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()),
//播放器的ID
width: '100%',
autoplay: true // isLive: true,
@ -354,7 +354,11 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
_this3.initPlayer();
});
} else {
this.initPlayer();
this.initPlayer(); //这样是为了兼容页面上有多个播放器
scriptTag.addEventListener("load", function () {
_this3.initPlayer();
});
}
},
@ -365,7 +369,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
initPlayer: function initPlayer() {
var _this4 = this;
// console.log(`this.player`,this.player);
if (typeof window.Aliplayer != 'undefined') {
var options = this.options;
@ -377,7 +380,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
if (this.source) this.config.source = this.source; //播放源
this.config.id = this.id;
if (this.id) this.config.id = this.id;
this.player && this.player.dispose(); //防止实例的重复
this.player = Aliplayer(this.config);
@ -674,6 +677,8 @@ 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"]');
@ -683,7 +688,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
}
});
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=script&lang=js&
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */
@ -795,7 +800,7 @@ var component = normalizeComponent(
null,
null,
null
)
/* harmony default export */ var main = (component.exports);
@ -1857,4 +1862,4 @@ module.exports = !__webpack_require__("0cc1")(function () {
/***/ })
/******/ });
//# sourceMappingURL=vue-aliplayer-v2.common.js.map
//# sourceMappingURL=vue-aliplayer-v2.common.js.map

View File

@ -151,12 +151,12 @@ 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/src/main.vue?vue&type=template&id=3211d44f&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.id}})}
// 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/src/main.vue?vue&type=template&id=f75253da&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.config.id}})}
var staticRenderFns = []
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=3211d44f&
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=f75253da&
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.10@core-js/modules/web.dom.iterable.js
var web_dom_iterable = __webpack_require__("4634");
@ -190,7 +190,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
id: {
required: false,
type: [String],
default: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase())
default: null
},
cssLink: {
//css版本源
@ -210,7 +210,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
player: null,
//播放器实例
config: {
id: null,
id: "player-".concat(Math.random().toString(36).substr(2).toLocaleUpperCase()),
//播放器的ID
width: '100%',
autoplay: true // isLive: true,
@ -363,7 +363,11 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
_this3.initPlayer();
});
} else {
this.initPlayer();
this.initPlayer(); //这样是为了兼容页面上有多个播放器
scriptTag.addEventListener("load", function () {
_this3.initPlayer();
});
}
},
@ -374,7 +378,6 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
initPlayer: function initPlayer() {
var _this4 = this;
// console.log(`this.player`,this.player);
if (typeof window.Aliplayer != 'undefined') {
var options = this.options;
@ -386,7 +389,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
if (this.source) this.config.source = this.source; //播放源
this.config.id = this.id;
if (this.id) this.config.id = this.id;
this.player && this.player.dispose(); //防止实例的重复
this.player = Aliplayer(this.config);
@ -683,6 +686,8 @@ 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"]');
@ -692,7 +697,7 @@ var es6_regexp_to_string = __webpack_require__("cc1d");
}
});
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=script&lang=js&
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */
@ -804,7 +809,7 @@ var component = normalizeComponent(
null,
null,
null
)
/* harmony default export */ var main = (component.exports);
@ -1867,4 +1872,4 @@ module.exports = !__webpack_require__("0cc1")(function () {
/******/ });
});
//# sourceMappingURL=vue-aliplayer-v2.umd.js.map
//# sourceMappingURL=vue-aliplayer-v2.umd.js.map

File diff suppressed because one or more lines are too long