Merge pull request #64 from langyuxiansheng/dev_v1.3.1

Dev v1.3.1
This commit is contained in:
langyuxiansheng 2022-05-12 16:47:43 +08:00 committed by GitHub
commit cdf70ab208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 595 additions and 544 deletions

View File

@ -219,6 +219,13 @@ components: {
```javascript
props:{
forbidFastForward: { //禁止拖拽快进
required: false,
type: [Boolean],
default: false
},
options: { //配置项 (options.source 不支持动态切换,需要动态切换请直接使用source)
required: false,
type: [Object],
@ -455,10 +462,11 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
## 更新日志
> v1.3.0
> v1.3.0 修复部分已知bug,增加forbidFastForward 属性,感谢 "william-xue"网友的功能提交.
- sdk 版本更新,默认 SDK 版本由 2.9.3 更新为 2.9.7
- sdk 版本更新,默认 SDK 版本由 2.9.3 更新为 2.9.20
- 默认注释更新
- 增加禁止用户拖拽快进的属性选项 forbidFastForward [Boolean] 默认 false
> v1.2.9 修正部分默认属性, 感谢"Schean17"网友的反馈与建议.

View File

@ -13,7 +13,7 @@
<p class="remove-text" v-if="!show">播放器已销毁!</p>
<div class="player-btns">
<template v-if="!isShowMultiple && show">
<span @click="play()">播放</span>
<span @click="pause()">暂停</span>
<span @click="replay()">重播</span>
@ -58,7 +58,7 @@
// import VueAliplayerV2 from '../packages';
export default {
// components:{ VueAliplayerV2 },
data(){
data () {
return {
options: {
// source:'//player.alicdn.com/video/aliyunmedia.mp4',
@ -105,42 +105,42 @@ export default {
source: '//player.alicdn.com/video/aliyunmedia.mp4',
// source: '//ivi.bupt.edu.cn/hls/cctv1.m3u8',
show: true,
forbidFastForward:false,
forbidFastForward: false,
isShowMultiple: false,
}
},
methods:{
methods: {
play(){
play () {
this.$refs.VueAliplayerV2.play()
},
pause(){
pause () {
this.$refs.VueAliplayerV2.pause();
},
replay(){
replay () {
this.$refs.VueAliplayerV2.replay();
},
handlerForbidFastForward(){
handlerForbidFastForward () {
this.forbidFastForward = true
},
getCurrentTime(){
getCurrentTime () {
// this.$refs.VueAliplayerV2.getCurrentTime();
this.source = 'http://ivi.bupt.edu.cn/hls/cctv1.m3u8';
},
getStatus(){
const status = this.$refs.VueAliplayerV2.getStatus();
console.log(`getStatus:`, status);
alert(`getStatus:${status}`);
getStatus () {
const status = this.$refs.VueAliplayerV2.getStatus();
console.log(`getStatus:`, status);
alert(`getStatus:${status}`);
},
showMultiple(){
showMultiple () {
this.isShowMultiple = !this.isShowMultiple;
}
}
@ -151,19 +151,19 @@ export default {
margin: 0;
padding: 0;
}
.remove-text{
.remove-text {
text-align: center;
padding: 20px;
font-size: 24px;
}
.show-multiple{
.show-multiple {
display: flex;
.multiple-player{
.multiple-player {
width: calc(100% / 4);
margin: 20px;
}
}
.player-btns{
.player-btns {
width: 100%;
display: flex;
justify-content: center;
@ -183,18 +183,18 @@ export default {
cursor: pointer;
}
}
.source-box{
.source-box {
padding: 5px 10px;
margin-bottom: 10px;
.source-label{
.source-label {
margin-right: 20px;
font-size: 16px;
display: block;
}
#source{
#source {
margin-top: 10px;
}
.source-input{
.source-input {
margin-top: 10px;
padding: 5px 10px;
width: 80%;

View File

@ -87,30 +87,22 @@ module.exports =
/************************************************************************/
/******/ ({
/***/ "05fd":
/***/ (function(module, exports, __webpack_require__) {
/***/ "0614":
/***/ (function(module, exports) {
module.exports = __webpack_require__("baa7")('native-function-to-string', Function.toString);
/***/ }),
/***/ "065d":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("bb8b");
var createDesc = __webpack_require__("5edc");
module.exports = __webpack_require__("26df") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "0926":
/***/ "0cc1":
/***/ (function(module, exports) {
module.exports = function (exec) {
@ -122,26 +114,12 @@ module.exports = function (exec) {
};
/***/ }),
/***/ "0b34":
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "112a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/setPublicPath.js
@ -161,36 +139,36 @@ if (typeof window !== 'undefined') {
// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.12@core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("a450");
// 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":"52b194f6-vue-loader-template"}!./node_modules/_vue-loader@15.9.7@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.9.7@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=49dd74ed&
// 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=c8a41478&
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=49dd74ed&
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.14.6@@babel/runtime/helpers/esm/typeof.js
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
return _typeof2(obj);
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
}
return _typeof(obj);
}
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.12@core-js/modules/es6.regexp.to-string.js
var es6_regexp_to_string = __webpack_require__("4057");
// 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.2.2@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.7@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
// 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&
//
@ -199,6 +177,12 @@ var es6_regexp_to_string = __webpack_require__("4057");
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
name: 'VueAliplayerV2',
props: {
forbidFastForward: {
//禁止拖拽快进
required: false,
type: [Boolean],
default: false
},
options: {
//配置项
required: false,
@ -217,13 +201,13 @@ var es6_regexp_to_string = __webpack_require__("4057");
//css版本源
required: false,
type: [String],
default: "https://g.alicdn.com/de/prismplayer/2.9.7/skins/default/aliplayer-min.css"
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
},
scriptSrc: {
//js版本源
required: false,
type: [String],
default: "https://g.alicdn.com/de/prismplayer/2.9.7/aliplayer-min.js"
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
}
},
data: function data() {
@ -326,6 +310,9 @@ var es6_regexp_to_string = __webpack_require__("4057");
//监听播放源变化
this.init();
},
forbidFastForward: function forbidFastForward() {
this.init();
},
options: {
//配置项是对象,只能深度监听
handler: function handler() {
@ -350,6 +337,8 @@ var es6_regexp_to_string = __webpack_require__("4057");
});
},
methods: {
handlerFastForward: function handlerFastForward() {},
/**
* 创建script和css
* 加载Alipayer的SDK
@ -426,6 +415,25 @@ var es6_regexp_to_string = __webpack_require__("4057");
for (var ev in this.events) {
_loop(ev);
} //开启禁止拖拽快进
if (this.forbidFastForward) {
var last = 0,
max_time = 0;
this.player.on('timeupdate', function () {
var current = this.getCurrentTime();
if (current - last > 2) {
this.seek(last);
} else {
last = current;
if (last >= max_time) {
max_time = last;
}
}
});
} //通过播放器实例的off方法取消订阅
//player.off('ready',handleReady);
@ -748,7 +756,7 @@ var es6_regexp_to_string = __webpack_require__("4057");
});
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
/* harmony default export */ var packages_AliplayerV2vue_type_script_lang_js_ = (AliplayerV2vue_type_script_lang_js_);
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.9.7@vue-loader/lib/runtime/componentNormalizer.js
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
@ -813,12 +821,7 @@ function normalizeComponent (
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
@ -827,7 +830,7 @@ function normalizeComponent (
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functional component in vue file
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
@ -891,74 +894,21 @@ AliplayerV2.Player = AliplayerV2;
/***/ }),
/***/ "26df":
/***/ "25ae":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("0926")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
module.exports = !__webpack_require__("f9a5") && !__webpack_require__("0cc1")(function () {
return Object.defineProperty(__webpack_require__("6618")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "3d8a":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "4057":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__("de49");
var anObject = __webpack_require__("a86f");
var $flags = __webpack_require__("6bf8");
var DESCRIPTORS = __webpack_require__("26df");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
var define = function (fn) {
__webpack_require__("84e8")(RegExp.prototype, TO_STRING, fn, true);
};
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__("0926")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "4fd4":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "5d10":
/***/ "2ab1":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("9cff");
var isObject = __webpack_require__("da0b");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
@ -973,73 +923,131 @@ module.exports = function (it, S) {
/***/ }),
/***/ "5edc":
/***/ "3f8b":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "4d2c":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "6bf8":
/***/ (function(module, exports, __webpack_require__) {
/***/ "549d":
/***/ (function(module, exports) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("a86f");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "76e3":
/***/ (function(module, exports) {
/***/ "6618":
/***/ (function(module, exports, __webpack_require__) {
var core = module.exports = { version: '2.6.12' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
var isObject = __webpack_require__("da0b");
var document = __webpack_require__("3f8b").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "83d3":
/***/ "6cc2":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "6fe0":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("26df") && !__webpack_require__("0926")(function () {
return Object.defineProperty(__webpack_require__("e8d7")('div'), 'a', { get: function () { return 7; } }).a != 7;
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
/***/ }),
/***/ "7cfd":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("d3d8").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/***/ "84e8":
/***/ "8cac":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("0b34");
var hide = __webpack_require__("065d");
var has = __webpack_require__("4fd4");
var SRC = __webpack_require__("d8b3")('src');
var $toString = __webpack_require__("05fd");
var isObject = __webpack_require__("da0b");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "9f7e":
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__("e7a1")
});
/***/ }),
/***/ "a6d5":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("3f8b");
var hide = __webpack_require__("b8ea");
var has = __webpack_require__("549d");
var SRC = __webpack_require__("4d2c")('src');
var $toString = __webpack_require__("6fe0");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__("76e3").inspectSource = function (it) {
__webpack_require__("da27").inspectSource = function (it) {
return $toString.call(it);
};
@ -1066,79 +1074,63 @@ __webpack_require__("76e3").inspectSource = function (it) {
/***/ }),
/***/ "9cff":
/***/ (function(module, exports) {
/***/ "b8ea":
/***/ (function(module, exports, __webpack_require__) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
var dP = __webpack_require__("d3d8");
var createDesc = __webpack_require__("0614");
module.exports = __webpack_require__("f9a5") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "a450":
/***/ "cc1d":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("bb8b").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
"use strict";
// 19.2.4.2 name
NAME in FProto || __webpack_require__("26df") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
__webpack_require__("9f7e");
var anObject = __webpack_require__("8cac");
var $flags = __webpack_require__("e7a1");
var DESCRIPTORS = __webpack_require__("f9a5");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
/***/ }),
/***/ "a86f":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("9cff");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
var define = function (fn) {
__webpack_require__("a6d5")(RegExp.prototype, TO_STRING, fn, true);
};
/***/ }),
/***/ "baa7":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("76e3");
var global = __webpack_require__("0b34");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__("3d8a") ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "bb8b":
/***/ "d3d8":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("a86f");
var IE8_DOM_DEFINE = __webpack_require__("83d3");
var toPrimitive = __webpack_require__("5d10");
var anObject = __webpack_require__("8cac");
var IE8_DOM_DEFINE = __webpack_require__("25ae");
var toPrimitive = __webpack_require__("2ab1");
var dP = Object.defineProperty;
exports.f = __webpack_require__("26df") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
@ -1153,26 +1145,21 @@ exports.f = __webpack_require__("26df") ? Object.defineProperty : function defin
/***/ }),
/***/ "d8b3":
/***/ "da0b":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "de49":
/***/ (function(module, exports, __webpack_require__) {
/***/ "da27":
/***/ (function(module, exports) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__("26df") && /./g.flags != 'g') __webpack_require__("bb8b").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__("6bf8")
});
var core = module.exports = { version: '2.6.10' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
@ -1220,18 +1207,55 @@ if (__webpack_require__("26df") && /./g.flags != 'g') __webpack_require__("bb8b"
/***/ }),
/***/ "e8d7":
/***/ "e7a1":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("9cff");
var document = __webpack_require__("0b34").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("8cac");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "f341":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("da27");
var global = __webpack_require__("3f8b");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__("6cc2") ? 'pure' : 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "f9a5":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("0cc1")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ })
/******/ });

View File

@ -96,30 +96,22 @@ return /******/ (function(modules) { // webpackBootstrap
/************************************************************************/
/******/ ({
/***/ "05fd":
/***/ (function(module, exports, __webpack_require__) {
/***/ "0614":
/***/ (function(module, exports) {
module.exports = __webpack_require__("baa7")('native-function-to-string', Function.toString);
/***/ }),
/***/ "065d":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("bb8b");
var createDesc = __webpack_require__("5edc");
module.exports = __webpack_require__("26df") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "0926":
/***/ "0cc1":
/***/ (function(module, exports) {
module.exports = function (exec) {
@ -131,26 +123,12 @@ module.exports = function (exec) {
};
/***/ }),
/***/ "0b34":
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "112a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/_@vue_cli-service@3.12.1@@vue/cli-service/lib/commands/build/setPublicPath.js
@ -170,36 +148,36 @@ if (typeof window !== 'undefined') {
// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.12@core-js/modules/es6.function.name.js
var es6_function_name = __webpack_require__("a450");
// 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":"52b194f6-vue-loader-template"}!./node_modules/_vue-loader@15.9.7@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.9.7@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=template&id=49dd74ed&
// 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=c8a41478&
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=49dd74ed&
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=template&id=c8a41478&
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.7.2@@babel/runtime/helpers/esm/typeof.js
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
// CONCATENATED MODULE: ./node_modules/_@babel_runtime@7.14.6@@babel/runtime/helpers/esm/typeof.js
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
return _typeof2(obj);
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
};
}
return _typeof(obj);
}
// EXTERNAL MODULE: ./node_modules/_core-js@2.6.12@core-js/modules/es6.regexp.to-string.js
var es6_regexp_to_string = __webpack_require__("4057");
// 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.2.2@babel-loader/lib!./node_modules/_cache-loader@2.0.1@cache-loader/dist/cjs.js??ref--0-0!./node_modules/_vue-loader@15.9.7@vue-loader/lib??vue-loader-options!./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
// 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&
//
@ -208,6 +186,12 @@ var es6_regexp_to_string = __webpack_require__("4057");
/* harmony default export */ var AliplayerV2vue_type_script_lang_js_ = ({
name: 'VueAliplayerV2',
props: {
forbidFastForward: {
//禁止拖拽快进
required: false,
type: [Boolean],
default: false
},
options: {
//配置项
required: false,
@ -226,13 +210,13 @@ var es6_regexp_to_string = __webpack_require__("4057");
//css版本源
required: false,
type: [String],
default: "https://g.alicdn.com/de/prismplayer/2.9.7/skins/default/aliplayer-min.css"
default: "https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css"
},
scriptSrc: {
//js版本源
required: false,
type: [String],
default: "https://g.alicdn.com/de/prismplayer/2.9.7/aliplayer-min.js"
default: "https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js"
}
},
data: function data() {
@ -335,6 +319,9 @@ var es6_regexp_to_string = __webpack_require__("4057");
//监听播放源变化
this.init();
},
forbidFastForward: function forbidFastForward() {
this.init();
},
options: {
//配置项是对象,只能深度监听
handler: function handler() {
@ -359,6 +346,8 @@ var es6_regexp_to_string = __webpack_require__("4057");
});
},
methods: {
handlerFastForward: function handlerFastForward() {},
/**
* 创建script和css
* 加载Alipayer的SDK
@ -435,6 +424,25 @@ var es6_regexp_to_string = __webpack_require__("4057");
for (var ev in this.events) {
_loop(ev);
} //开启禁止拖拽快进
if (this.forbidFastForward) {
var last = 0,
max_time = 0;
this.player.on('timeupdate', function () {
var current = this.getCurrentTime();
if (current - last > 2) {
this.seek(last);
} else {
last = current;
if (last >= max_time) {
max_time = last;
}
}
});
} //通过播放器实例的off方法取消订阅
//player.off('ready',handleReady);
@ -757,7 +765,7 @@ var es6_regexp_to_string = __webpack_require__("4057");
});
// CONCATENATED MODULE: ./packages/AliplayerV2/index.vue?vue&type=script&lang=js&
/* harmony default export */ var packages_AliplayerV2vue_type_script_lang_js_ = (AliplayerV2vue_type_script_lang_js_);
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.9.7@vue-loader/lib/runtime/componentNormalizer.js
// CONCATENATED MODULE: ./node_modules/_vue-loader@15.7.2@vue-loader/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
@ -822,12 +830,7 @@ function normalizeComponent (
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () {
injectStyles.call(
this,
(options.functional ? this.parent : this).$root.$options.shadowRoot
)
}
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
@ -836,7 +839,7 @@ function normalizeComponent (
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functional component in vue file
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
@ -900,74 +903,21 @@ AliplayerV2.Player = AliplayerV2;
/***/ }),
/***/ "26df":
/***/ "25ae":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("0926")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
module.exports = !__webpack_require__("f9a5") && !__webpack_require__("0cc1")(function () {
return Object.defineProperty(__webpack_require__("6618")('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "3d8a":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "4057":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__("de49");
var anObject = __webpack_require__("a86f");
var $flags = __webpack_require__("6bf8");
var DESCRIPTORS = __webpack_require__("26df");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
var define = function (fn) {
__webpack_require__("84e8")(RegExp.prototype, TO_STRING, fn, true);
};
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__("0926")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "4fd4":
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "5d10":
/***/ "2ab1":
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__("9cff");
var isObject = __webpack_require__("da0b");
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
@ -982,73 +932,131 @@ module.exports = function (it, S) {
/***/ }),
/***/ "5edc":
/***/ "3f8b":
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/***/ "4d2c":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/***/ "6bf8":
/***/ (function(module, exports, __webpack_require__) {
/***/ "549d":
/***/ (function(module, exports) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("a86f");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "76e3":
/***/ (function(module, exports) {
/***/ "6618":
/***/ (function(module, exports, __webpack_require__) {
var core = module.exports = { version: '2.6.12' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
var isObject = __webpack_require__("da0b");
var document = __webpack_require__("3f8b").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "83d3":
/***/ "6cc2":
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "6fe0":
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__("26df") && !__webpack_require__("0926")(function () {
return Object.defineProperty(__webpack_require__("e8d7")('div'), 'a', { get: function () { return 7; } }).a != 7;
module.exports = __webpack_require__("f341")('native-function-to-string', Function.toString);
/***/ }),
/***/ "7cfd":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("d3d8").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__("f9a5") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/***/ "84e8":
/***/ "8cac":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("0b34");
var hide = __webpack_require__("065d");
var has = __webpack_require__("4fd4");
var SRC = __webpack_require__("d8b3")('src');
var $toString = __webpack_require__("05fd");
var isObject = __webpack_require__("da0b");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/***/ "9f7e":
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__("f9a5") && /./g.flags != 'g') __webpack_require__("d3d8").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__("e7a1")
});
/***/ }),
/***/ "a6d5":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("3f8b");
var hide = __webpack_require__("b8ea");
var has = __webpack_require__("549d");
var SRC = __webpack_require__("4d2c")('src');
var $toString = __webpack_require__("6fe0");
var TO_STRING = 'toString';
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__("76e3").inspectSource = function (it) {
__webpack_require__("da27").inspectSource = function (it) {
return $toString.call(it);
};
@ -1075,79 +1083,63 @@ __webpack_require__("76e3").inspectSource = function (it) {
/***/ }),
/***/ "9cff":
/***/ (function(module, exports) {
/***/ "b8ea":
/***/ (function(module, exports, __webpack_require__) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
var dP = __webpack_require__("d3d8");
var createDesc = __webpack_require__("0614");
module.exports = __webpack_require__("f9a5") ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "a450":
/***/ "cc1d":
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__("bb8b").f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
"use strict";
// 19.2.4.2 name
NAME in FProto || __webpack_require__("26df") && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
__webpack_require__("9f7e");
var anObject = __webpack_require__("8cac");
var $flags = __webpack_require__("e7a1");
var DESCRIPTORS = __webpack_require__("f9a5");
var TO_STRING = 'toString';
var $toString = /./[TO_STRING];
/***/ }),
/***/ "a86f":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("9cff");
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
var define = function (fn) {
__webpack_require__("a6d5")(RegExp.prototype, TO_STRING, fn, true);
};
/***/ }),
/***/ "baa7":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("76e3");
var global = __webpack_require__("0b34");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__("3d8a") ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
// 21.2.5.14 RegExp.prototype.toString()
if (__webpack_require__("0cc1")(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
define(function toString() {
var R = anObject(this);
return '/'.concat(R.source, '/',
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
});
// FF44- RegExp#toString has a wrong name
} else if ($toString.name != TO_STRING) {
define(function toString() {
return $toString.call(this);
});
}
/***/ }),
/***/ "bb8b":
/***/ "d3d8":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("a86f");
var IE8_DOM_DEFINE = __webpack_require__("83d3");
var toPrimitive = __webpack_require__("5d10");
var anObject = __webpack_require__("8cac");
var IE8_DOM_DEFINE = __webpack_require__("25ae");
var toPrimitive = __webpack_require__("2ab1");
var dP = Object.defineProperty;
exports.f = __webpack_require__("26df") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
exports.f = __webpack_require__("f9a5") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
@ -1162,26 +1154,21 @@ exports.f = __webpack_require__("26df") ? Object.defineProperty : function defin
/***/ }),
/***/ "d8b3":
/***/ "da0b":
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "de49":
/***/ (function(module, exports, __webpack_require__) {
/***/ "da27":
/***/ (function(module, exports) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__("26df") && /./g.flags != 'g') __webpack_require__("bb8b").f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__("6bf8")
});
var core = module.exports = { version: '2.6.10' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
@ -1229,18 +1216,55 @@ if (__webpack_require__("26df") && /./g.flags != 'g') __webpack_require__("bb8b"
/***/ }),
/***/ "e8d7":
/***/ "e7a1":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("9cff");
var document = __webpack_require__("0b34").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__("8cac");
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "f341":
/***/ (function(module, exports, __webpack_require__) {
var core = __webpack_require__("da27");
var global = __webpack_require__("3f8b");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: core.version,
mode: __webpack_require__("6cc2") ? 'pure' : 'global',
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "f9a5":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("0cc1")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ })
/******/ });

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "vue-aliplayer-v2",
"version": "1.3.0",
"version": "1.3.1",
"author": "yxs",
"description": "感谢每一位支持开源的朋友. 这是一个基于Alipayer 开发并封装成vue组件的集成播放器.可播放rtmp,m3u8,mp4....视频.除支持直播流与点播的基础功能外,也支持视频的加密播放、清晰度切换、直播时移等业务场景",
"main": "lib/vue-aliplayer-v2.umd.min.js",

View File

@ -5,7 +5,7 @@
export default {
name: 'VueAliplayerV2',
props: {
forbidFastForward:{
forbidFastForward: { //
required: false,
type: [Boolean],
default: false
@ -20,22 +20,22 @@ export default {
type: [String],
default: null
},
cssLink:{ //css
cssLink: { //css
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.9.7/skins/default/aliplayer-min.css`
default: `https://g.alicdn.com/de/prismplayer/2.9.20/skins/default/aliplayer-min.css`
},
scriptSrc:{ //js
scriptSrc: { //js
required: false,
type: [String],
default: `https://g.alicdn.com/de/prismplayer/2.9.7/aliplayer-min.js`
default: `https://g.alicdn.com/de/prismplayer/2.9.20/aliplayer-min.js`
}
},
data () {
return {
player: null, //
playerId: `player-${Math.random().toString(36).substr(2).toLocaleUpperCase()}`,
config:{
config: {
id: null, //ID
width: '100%',
autoplay: true,
@ -43,7 +43,7 @@ export default {
//,
// source: 'rtmp://182.145.195.238:1935/hls/1194076936807170050',
},
events:[
events: [
/**
* 播放器视频初始化按钮渲染完毕
* 播放器UI初始设置需要此事件后触发避免UI被初始化所覆盖
@ -125,49 +125,49 @@ export default {
],
};
},
watch:{
source(){ //
watch: {
source () { //
this.init();
},
forbidFastForward(){
forbidFastForward () {
this.init();
},
options:{ //,
handler(){
options: { //,
handler () {
this.init();
},
deep: true
}
},
mounted () {
this.$nextTick(()=>{
this.$nextTick(() => {
this.init();
});
},
updated(){
updated () {
//
this.$nextTick(()=>{
this.$nextTick(() => {
this.init();
});
},
methods: {
handlerFastForward(){
handlerFastForward () {
},
/**
* 创建script和css
* 加载Alipayer的SDK
*/
init(){
init () {
const linkID = 'app__aliplayer-min-css';
const scriptID = 'app__aliplayer-min-js';
const head = document.getElementsByTagName('head');
const html = document.getElementsByTagName('html');
let scriptTag = document.getElementById(scriptID);
let linkIDTag = document.getElementById(linkID);
if(!linkIDTag) {
if (!linkIDTag) {
// console.log('linkIDTag');
const link = document.createElement('link');
link.type = 'text/css';
@ -177,7 +177,7 @@ export default {
// link.className = linkID;
head[0].appendChild(link);
}
if(!scriptTag) {
if (!scriptTag) {
// console.log('scriptTag');
scriptTag = document.createElement('script');
scriptTag.type = "text/javascript";
@ -198,46 +198,41 @@ export default {
* 创建播放器
* @description SDK文档地址:https://help.aliyun.com/document_detail/125572.html?spm=a2c4g.11186623.6.1084.131d1c4cJT7o5Z
*/
initPlayer(){
if(typeof window.Aliplayer != 'undefined') {
initPlayer () {
if (typeof window.Aliplayer != 'undefined') {
const options = this.deepCloneObject(this.options);
if(options){
if (options) {
for (const key in options) {
this.config[key] = options[key];
}
}
if(this.source) this.config.source = this.source; //
if (this.source) this.config.source = this.source; //
this.config.id = this.playerId; //id
this.player && this.player.dispose(); //
this.player = Aliplayer(this.config);
for(const ev in this.events){
this.player && this.player.on(this.events[ev],(e)=>{
for (const ev in this.events) {
this.player && this.player.on(this.events[ev], (e) => {
// console.log(`object ${this.events[ev]}`,e);
this.$emit(this.events[ev],e);
this.$emit(this.events[ev], e);
});
}
if(this.forbidFastForward){
let last = 0,max_time=0;
this.player.on('timeupdate',function(){
let current = this.getCurrentTime();
if(current - last > 2) {
//
if (this.forbidFastForward) {
let last = 0, max_time = 0;
this.player.on('timeupdate', function () {
let current = this.getCurrentTime();
if (current - last > 2) {
this.seek(last);
} else {
last = current;
if(last >= max_time){
max_time=last;
if (last >= max_time) {
max_time = last;
}
}
})
}
});
}
//off
//player.off('ready',handleReady);
@ -247,14 +242,14 @@ export default {
/**
* @return player 实例
*/
getPlayer(){
getPlayer () {
return this.player;
},
/**
* 播放视频
*/
play(){
play () {
// console.log(``);
this.player && this.player.play();
},
@ -262,7 +257,7 @@ export default {
/**
* 暂停视频
*/
pause(){
pause () {
// console.log(``);
this.player && this.player.pause();
},
@ -270,7 +265,7 @@ export default {
/**
* 重播视频
*/
replay(){
replay () {
// console.log(``);
this.player && this.player.replay();
},
@ -280,7 +275,7 @@ export default {
* @param time
* @return player
*/
seek(time){
seek (time) {
// console.log(`time${time}`);
this.player && this.player.seek(time);
},
@ -289,7 +284,7 @@ export default {
* 获取当前的播放时刻返回的单位为秒
* @return player
*/
getCurrentTime(){
getCurrentTime () {
// console.log(`${this.player && this.player.getCurrentTime()}`);
return this.player && this.player.getCurrentTime();
},
@ -298,7 +293,7 @@ export default {
* 获取视频总时长返回的单位为秒这个需要在视频加载完成以后才可以获取到可以在play事件后获取
* @return player
*/
getDuration(){
getDuration () {
// console.log(`${this.player && this.player.getDuration()}`);
return this.player && this.player.getDuration();
},
@ -307,7 +302,7 @@ export default {
* 获取当前的音量返回值为0-1的实数ios和部分android会失效
* @return player
*/
getVolume(){
getVolume () {
// console.log(`${this.player && this.player.getVolume()}`);
return this.player && this.player.getVolume();
},
@ -316,7 +311,7 @@ export default {
* 设置音量vol为0-1的实数ios和部分android会失效
* @return player
*/
setVolume(v){
setVolume (v) {
// console.log(`vol${v}`);
this.player && this.player.setVolume(v);
},
@ -326,7 +321,7 @@ export default {
* 暂不支持直播rtmp流切换
* @return player
*/
loadByUrl(url, time){
loadByUrl (url, time) {
// console.log(`url${url}time${time}`);
this.player && this.player.loadByUrl(url, time);
},
@ -336,7 +331,7 @@ export default {
* @param vid 视频id
* @param 播放凭证
*/
replayByVidAndPlayAuth(vid, playauth){
replayByVidAndPlayAuth (vid, playauth) {
// console.log(`replayByVidAndPlayAuth vid${vid}playauth${playauth}`);
this.player && this.player.replayByVidAndPlayAuth(vid, playauth);
},
@ -347,7 +342,7 @@ export default {
* @param 播放凭证
* @description 仅MPS用户时使用 仅MPS用户时使用 参数顺序为vidaccIdaccSecretstsTokenauthInfodomainRegion
*/
replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion){
replayByVidAndAuthInfo (vid, accId, accSecret, stsToken, authInfo, domainRegion) {
// console.log(`replayByVidAndAuthInfo vidaccIdaccSecretstsTokenauthInfodomainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion);
this.player && this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);
},
@ -358,7 +353,7 @@ export default {
* @param h 宽度
* @description chrome浏览器下flash播放器分别不能小于397x297
*/
setPlayerSize(w, h){
setPlayerSize (w, h) {
// console.log(` :${w},:${h}`);
this.player && this.player.setPlayerSize(w, h);
},
@ -370,7 +365,7 @@ export default {
* @param h 宽度
* @description {namespeedButtonaligntrx10y23}
*/
setSpeed(speed){
setSpeed (speed) {
// console.log(`:${speed}`);
this.player && this.player.setSpeed(speed);
},
@ -381,7 +376,7 @@ export default {
* @param height 高度
* @param rate 截图质量
*/
setSanpshotProperties(width, height, rate){
setSanpshotProperties (width, height, rate) {
// console.log(`:`,width, height, rate);
this.player && this.player.setSanpshotProperties(width, height, rate);
},
@ -389,7 +384,7 @@ export default {
/**
* 播放器全屏仅H5支持
*/
requestFullScreen(){
requestFullScreen () {
// console.log(`H5`);
this.player && this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();
},
@ -397,7 +392,7 @@ export default {
/**
* 播放器退出全屏iOS调用无效仅H5支持
*/
cancelFullScreen(){
cancelFullScreen () {
// console.log(`H5`);
this.player && this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();
},
@ -405,7 +400,7 @@ export default {
/**
* 获取播放器全屏状态仅H5支持
*/
getIsFullScreen(){
getIsFullScreen () {
// console.log(`H5`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getIsFullScreen());
return this.player && this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen();
},
@ -414,7 +409,7 @@ export default {
* 获取播放器状态包含的值,
* @returns init ready loading play pause playing waiting error ended
*/
getStatus(){
getStatus () {
// console.log(``,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus());
return this.player && this.player.getStatus();
},
@ -425,7 +420,7 @@ export default {
* @param endTime 结束时间
* @description 例子player.liveShiftSerivce.setLiveTimeRange(2018/01/04 20:00:00)
*/
setLiveTimeRange(beginTime, endTime){
setLiveTimeRange (beginTime, endTime) {
// console.log(`:${beginTime},:${endTime}使`);
this.player && this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);
},
@ -435,7 +430,7 @@ export default {
* @param rotate 旋转角度
* @description 例如: setRotate(90)详情参见旋转和镜像
*/
setRotate(rotate){
setRotate (rotate) {
// console.log(`:${rotate}`);
this.player && this.player.setRotate(rotate);
},
@ -444,7 +439,7 @@ export default {
* 获取旋转角度详情参见旋转和镜像
* @return rotate 旋转角度
*/
getRotate(){
getRotate () {
// console.log(`:${this.player && this.player.getRotate()}`);
return this.player && this.player.getRotate();
},
@ -454,7 +449,7 @@ export default {
* @param image 镜像类型 可选值为horizon,vertical
* @description 例如: setImage(horizon)详情参见旋转和镜像
*/
setImage(image){
setImage (image) {
// console.log(`:${image}`);
this.player && this.player.setImage(image);
},
@ -462,7 +457,7 @@ export default {
/**
* 播放器销毁
*/
dispose(){
dispose () {
// console.log(``);
this.player && this.player.dispose();
},
@ -471,7 +466,7 @@ export default {
* 设置封面
* @param cover 封面地址
*/
setCover(cover){
setCover (cover) {
// console.log(`:${cover}`);
this.player && this.player.setCover(cover);
},
@ -480,7 +475,7 @@ export default {
* 设置封面
* @param markers 设置打点数据
*/
setProgressMarkers(markers){
setProgressMarkers (markers) {
// console.log(`markers:${markers}`);
this.player && this.player.setProgressMarkers(markers);
},
@ -489,7 +484,7 @@ export default {
* 设置试看时间单位为秒详情参见
* @param time 试看时间
*/
setPreviewTime(time){
setPreviewTime (time) {
// console.log(`:${time}`);
this.player && this.player.setPreviewTime(time);
},
@ -498,7 +493,7 @@ export default {
* 获取试看时间
* @return rotate 旋转角度
*/
getPreviewTime(){
getPreviewTime () {
// console.log(`:${this.player && this.player.getPreviewTime()}`);
return this.player && this.player.getPreviewTime();
},
@ -506,7 +501,7 @@ export default {
/**
* 是否试看
*/
isPreview(){
isPreview () {
// console.log(``);
this.player && this.player.isPreview();
},
@ -515,8 +510,8 @@ export default {
* @param ev 事件名
* @param handle 回调方法
*/
off(ev,handle){
this.player && this.player.off(ev,handle);
off (ev, handle) {
this.player && this.player.off(ev, handle);
},
@ -543,7 +538,7 @@ export default {
}
},
beforeDestroy(){ //
beforeDestroy () { //
this.dispose(); //(,,bug)
// const head = document.querySelector('head');
// const cssNodes = document.querySelectorAll(`link.app__aliplayer-min-css`);