mirror of
https://github.com/langyuxiansheng/vue-aliplayer-v2.git
synced 2025-04-06 03:57:55 +08:00
更新包
This commit is contained in:
parent
a35a813c4e
commit
1ea8941683
@ -127,12 +127,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=2be8a9a5&
|
||||
// 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=f3242f72&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.id}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=2be8a9a5&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=f3242f72&
|
||||
|
||||
// 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/src/main.vue?vue&type=script&lang=js&
|
||||
//
|
||||
@ -342,10 +342,10 @@ var staticRenderFns = []
|
||||
|
||||
if (!this.player) {
|
||||
// console.log(this.config);
|
||||
this.player = new Aliplayer(this.config);
|
||||
this.player = Aliplayer(this.config);
|
||||
|
||||
var _loop = function _loop(ev) {
|
||||
_this4.player.on(_this4.events[ev], function (e) {
|
||||
_this4.player && _this4.player.on(_this4.events[ev], function (e) {
|
||||
// console.log(`object ${this.events[ev]}`,e);
|
||||
_this4.$emit(_this4.events[ev], e);
|
||||
});
|
||||
@ -355,8 +355,8 @@ var staticRenderFns = []
|
||||
_loop(ev);
|
||||
}
|
||||
} else {
|
||||
this.player.replay(); //销毁后重播
|
||||
// console.log(`this.player.replay()`,'销毁后重播');
|
||||
this.player && this.player.replay(); //销毁后重播
|
||||
// console.log(`this.player && this.player.replay()`,'销毁后重播');
|
||||
} //通过播放器实例的off方法取消订阅
|
||||
//player.off('ready',handleReady);
|
||||
|
||||
@ -375,7 +375,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
play: function play() {
|
||||
// console.log(`播放视频。`);
|
||||
this.player.play();
|
||||
this.player && this.player.play();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -383,7 +383,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
pause: function pause() {
|
||||
// console.log(`暂停视频`);
|
||||
this.player.pause();
|
||||
this.player && this.player.pause();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -391,7 +391,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replay: function replay() {
|
||||
// console.log(`重播视频`);
|
||||
this.player.replay();
|
||||
this.player && this.player.replay();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -401,7 +401,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
seek: function seek(time) {
|
||||
// console.log(`跳转到某个时刻进行播放,time为${time}秒。`);
|
||||
this.player.seek(time);
|
||||
this.player && this.player.seek(time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -409,8 +409,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getCurrentTime: function getCurrentTime() {
|
||||
// console.log(`获取当前的播放时刻,返回的单位为${this.player.getCurrentTime()}秒。`);
|
||||
return this.player.getCurrentTime();
|
||||
// console.log(`获取当前的播放时刻,返回的单位为${this.player && this.player.getCurrentTime()}秒。`);
|
||||
return this.player && this.player.getCurrentTime();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -418,8 +418,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getDuration: function getDuration() {
|
||||
// console.log(`获取视频总时长,返回的单位为${this.player.getDuration()}秒。`);
|
||||
return this.player.getDuration();
|
||||
// console.log(`获取视频总时长,返回的单位为${this.player && this.player.getDuration()}秒。`);
|
||||
return this.player && this.player.getDuration();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -427,8 +427,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getVolume: function getVolume() {
|
||||
// console.log(`获取当前的音量${this.player.getVolume()}。`);
|
||||
return this.player.getVolume();
|
||||
// console.log(`获取当前的音量${this.player && this.player.getVolume()}。`);
|
||||
return this.player && this.player.getVolume();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -437,7 +437,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setVolume: function setVolume(v) {
|
||||
// console.log(`设置音量,vol为${v}。`);
|
||||
this.player.setVolume(v);
|
||||
this.player && this.player.setVolume(v);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -447,7 +447,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
loadByUrl: function loadByUrl(url, time) {
|
||||
// console.log(`直接播放视频url${url},time为${time}。`);
|
||||
this.player.loadByUrl(url, time);
|
||||
this.player && this.player.loadByUrl(url, time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -457,7 +457,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replayByVidAndPlayAuth: function replayByVidAndPlayAuth(vid, playauth) {
|
||||
// console.log(`replayByVidAndPlayAuth vid${vid},playauth为${playauth}。`);
|
||||
this.player.replayByVidAndPlayAuth(vid, playauth);
|
||||
this.player && this.player.replayByVidAndPlayAuth(vid, playauth);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -468,7 +468,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replayByVidAndAuthInfo: function replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion) {
|
||||
// console.log(`replayByVidAndAuthInfo 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
this.player && this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -479,7 +479,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setPlayerSize: function setPlayerSize(w, h) {
|
||||
// console.log(`设置播放器大小 宽度:${w},高度:${h}`);
|
||||
this.player.setPlayerSize(w, h);
|
||||
this.player && this.player.setPlayerSize(w, h);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -491,7 +491,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setSpeed: function setSpeed(speed) {
|
||||
// console.log(`手动设置播放的倍速:${speed}`);
|
||||
this.player.setSpeed(speed);
|
||||
this.player && this.player.setSpeed(speed);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -502,7 +502,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setSanpshotProperties: function setSanpshotProperties(width, height, rate) {
|
||||
// console.log(`设置截图参数:`,width, height, rate);
|
||||
this.player.setSanpshotProperties(width, height, rate);
|
||||
this.player && this.player.setSanpshotProperties(width, height, rate);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -510,7 +510,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
requestFullScreen: function requestFullScreen() {
|
||||
// console.log(`播放器全屏,仅H5支持`);
|
||||
this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();
|
||||
this.player && this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -518,15 +518,15 @@ var staticRenderFns = []
|
||||
*/
|
||||
cancelFullScreen: function cancelFullScreen() {
|
||||
// console.log(`播放器全屏,仅H5支持`);
|
||||
this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();
|
||||
this.player && this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取播放器全屏状态,仅H5支持。
|
||||
*/
|
||||
getIsFullScreen: function getIsFullScreen() {
|
||||
// console.log(`获取播放器全屏状态,仅H5支持。`,this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen());
|
||||
return this.player.fullscreenService && this.player.fullscreenService.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();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -534,8 +534,8 @@ var staticRenderFns = []
|
||||
* @returns init ready loading play pause playing waiting error ended
|
||||
*/
|
||||
getStatus: function getStatus() {
|
||||
// console.log(`获取播放器状态,包含的值`,this.player.fullscreenService && this.player.fullscreenService.getStatus());
|
||||
return this.player.fullscreenService && this.player.fullscreenService.getStatus();
|
||||
// console.log(`获取播放器状态,包含的值`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus());
|
||||
return this.player && this.player.fullscreenService && this.player.fullscreenService.getStatus();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -546,7 +546,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setLiveTimeRange: function setLiveTimeRange(beginTime, endTime) {
|
||||
// console.log(`设置直播的开始时间:${beginTime},结束时间:${endTime},开启直播时移功能时使用。`);
|
||||
this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);
|
||||
this.player && this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -556,7 +556,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setRotate: function setRotate(rotate) {
|
||||
// console.log(`参数为旋转角度:${rotate}。`);
|
||||
this.player.setRotate(rotate);
|
||||
this.player && this.player.setRotate(rotate);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -564,8 +564,8 @@ var staticRenderFns = []
|
||||
* @return rotate 旋转角度
|
||||
*/
|
||||
getRotate: function getRotate() {
|
||||
// console.log(`获取旋转角度:${this.player.getRotate()}`);
|
||||
return this.player.getRotate();
|
||||
// console.log(`获取旋转角度:${this.player && this.player.getRotate()}`);
|
||||
return this.player && this.player.getRotate();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -575,7 +575,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setImage: function setImage(image) {
|
||||
// console.log(`设置镜像:${image}。`);
|
||||
this.player.setImage(image);
|
||||
this.player && this.player.setImage(image);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -583,7 +583,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
dispose: function dispose() {
|
||||
// console.log(`播放器销毁。`);
|
||||
this.player.dispose();
|
||||
this.player && this.player.dispose();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -592,7 +592,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setCover: function setCover(cover) {
|
||||
// console.log(`设置封面:${cover}`);
|
||||
this.player.setCover(cover);
|
||||
this.player && this.player.setCover(cover);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -601,7 +601,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setProgressMarkers: function setProgressMarkers(markers) {
|
||||
// console.log(`markers打点数据集合:${markers}`);
|
||||
this.player.setProgressMarkers(markers);
|
||||
this.player && this.player.setProgressMarkers(markers);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -610,7 +610,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setPreviewTime: function setPreviewTime(time) {
|
||||
// console.log(`设置试看时间,单位为:${time}秒`);
|
||||
this.player.setPreviewTime(time);
|
||||
this.player && this.player.setPreviewTime(time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -618,8 +618,8 @@ var staticRenderFns = []
|
||||
* @return rotate 旋转角度
|
||||
*/
|
||||
getPreviewTime: function getPreviewTime() {
|
||||
// console.log(`获取试看时间:${this.player.getPreviewTime()}`);
|
||||
return this.player.getPreviewTime();
|
||||
// console.log(`获取试看时间:${this.player && this.player.getPreviewTime()}`);
|
||||
return this.player && this.player.getPreviewTime();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -627,7 +627,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
isPreview: function isPreview() {
|
||||
// console.log(`是否试看`);
|
||||
this.player.isPreview();
|
||||
this.player && this.player.isPreview();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -635,8 +635,13 @@ var staticRenderFns = []
|
||||
* @param handle 回调方法
|
||||
*/
|
||||
off: function off(ev, handle) {
|
||||
this.player.off(ev, handle);
|
||||
this.player && this.player.off(ev, handle);
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
//防止重复创建,需要销毁原来的播放器
|
||||
console.log('beforeDestroy');
|
||||
this.player && this.player.dispose();
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=script&lang=js&
|
||||
|
@ -136,12 +136,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=2be8a9a5&
|
||||
// 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=f3242f72&
|
||||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":_vm.id}})}
|
||||
var staticRenderFns = []
|
||||
|
||||
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=2be8a9a5&
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=template&id=f3242f72&
|
||||
|
||||
// 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/src/main.vue?vue&type=script&lang=js&
|
||||
//
|
||||
@ -351,10 +351,10 @@ var staticRenderFns = []
|
||||
|
||||
if (!this.player) {
|
||||
// console.log(this.config);
|
||||
this.player = new Aliplayer(this.config);
|
||||
this.player = Aliplayer(this.config);
|
||||
|
||||
var _loop = function _loop(ev) {
|
||||
_this4.player.on(_this4.events[ev], function (e) {
|
||||
_this4.player && _this4.player.on(_this4.events[ev], function (e) {
|
||||
// console.log(`object ${this.events[ev]}`,e);
|
||||
_this4.$emit(_this4.events[ev], e);
|
||||
});
|
||||
@ -364,8 +364,8 @@ var staticRenderFns = []
|
||||
_loop(ev);
|
||||
}
|
||||
} else {
|
||||
this.player.replay(); //销毁后重播
|
||||
// console.log(`this.player.replay()`,'销毁后重播');
|
||||
this.player && this.player.replay(); //销毁后重播
|
||||
// console.log(`this.player && this.player.replay()`,'销毁后重播');
|
||||
} //通过播放器实例的off方法取消订阅
|
||||
//player.off('ready',handleReady);
|
||||
|
||||
@ -384,7 +384,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
play: function play() {
|
||||
// console.log(`播放视频。`);
|
||||
this.player.play();
|
||||
this.player && this.player.play();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -392,7 +392,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
pause: function pause() {
|
||||
// console.log(`暂停视频`);
|
||||
this.player.pause();
|
||||
this.player && this.player.pause();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -400,7 +400,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replay: function replay() {
|
||||
// console.log(`重播视频`);
|
||||
this.player.replay();
|
||||
this.player && this.player.replay();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -410,7 +410,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
seek: function seek(time) {
|
||||
// console.log(`跳转到某个时刻进行播放,time为${time}秒。`);
|
||||
this.player.seek(time);
|
||||
this.player && this.player.seek(time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -418,8 +418,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getCurrentTime: function getCurrentTime() {
|
||||
// console.log(`获取当前的播放时刻,返回的单位为${this.player.getCurrentTime()}秒。`);
|
||||
return this.player.getCurrentTime();
|
||||
// console.log(`获取当前的播放时刻,返回的单位为${this.player && this.player.getCurrentTime()}秒。`);
|
||||
return this.player && this.player.getCurrentTime();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -427,8 +427,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getDuration: function getDuration() {
|
||||
// console.log(`获取视频总时长,返回的单位为${this.player.getDuration()}秒。`);
|
||||
return this.player.getDuration();
|
||||
// console.log(`获取视频总时长,返回的单位为${this.player && this.player.getDuration()}秒。`);
|
||||
return this.player && this.player.getDuration();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -436,8 +436,8 @@ var staticRenderFns = []
|
||||
* @return player
|
||||
*/
|
||||
getVolume: function getVolume() {
|
||||
// console.log(`获取当前的音量${this.player.getVolume()}。`);
|
||||
return this.player.getVolume();
|
||||
// console.log(`获取当前的音量${this.player && this.player.getVolume()}。`);
|
||||
return this.player && this.player.getVolume();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -446,7 +446,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setVolume: function setVolume(v) {
|
||||
// console.log(`设置音量,vol为${v}。`);
|
||||
this.player.setVolume(v);
|
||||
this.player && this.player.setVolume(v);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -456,7 +456,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
loadByUrl: function loadByUrl(url, time) {
|
||||
// console.log(`直接播放视频url${url},time为${time}。`);
|
||||
this.player.loadByUrl(url, time);
|
||||
this.player && this.player.loadByUrl(url, time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -466,7 +466,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replayByVidAndPlayAuth: function replayByVidAndPlayAuth(vid, playauth) {
|
||||
// console.log(`replayByVidAndPlayAuth vid${vid},playauth为${playauth}。`);
|
||||
this.player.replayByVidAndPlayAuth(vid, playauth);
|
||||
this.player && this.player.replayByVidAndPlayAuth(vid, playauth);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -477,7 +477,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
replayByVidAndAuthInfo: function replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion) {
|
||||
// console.log(`replayByVidAndAuthInfo 参数顺序为:vid、accId、accSecret、stsToken、authInfo、domainRegion`,vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
this.player && this.player.replayByVidAndAuthInfo(vid, accId, accSecret, stsToken, authInfo, domainRegion);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -488,7 +488,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setPlayerSize: function setPlayerSize(w, h) {
|
||||
// console.log(`设置播放器大小 宽度:${w},高度:${h}`);
|
||||
this.player.setPlayerSize(w, h);
|
||||
this.player && this.player.setPlayerSize(w, h);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -500,7 +500,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setSpeed: function setSpeed(speed) {
|
||||
// console.log(`手动设置播放的倍速:${speed}`);
|
||||
this.player.setSpeed(speed);
|
||||
this.player && this.player.setSpeed(speed);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -511,7 +511,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setSanpshotProperties: function setSanpshotProperties(width, height, rate) {
|
||||
// console.log(`设置截图参数:`,width, height, rate);
|
||||
this.player.setSanpshotProperties(width, height, rate);
|
||||
this.player && this.player.setSanpshotProperties(width, height, rate);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -519,7 +519,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
requestFullScreen: function requestFullScreen() {
|
||||
// console.log(`播放器全屏,仅H5支持`);
|
||||
this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();
|
||||
this.player && this.player.fullscreenService && this.player.fullscreenService.requestFullScreen();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -527,15 +527,15 @@ var staticRenderFns = []
|
||||
*/
|
||||
cancelFullScreen: function cancelFullScreen() {
|
||||
// console.log(`播放器全屏,仅H5支持`);
|
||||
this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();
|
||||
this.player && this.player.fullscreenService && this.player.fullscreenService.cancelFullScreen();
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取播放器全屏状态,仅H5支持。
|
||||
*/
|
||||
getIsFullScreen: function getIsFullScreen() {
|
||||
// console.log(`获取播放器全屏状态,仅H5支持。`,this.player.fullscreenService && this.player.fullscreenService.getIsFullScreen());
|
||||
return this.player.fullscreenService && this.player.fullscreenService.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();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -543,8 +543,8 @@ var staticRenderFns = []
|
||||
* @returns init ready loading play pause playing waiting error ended
|
||||
*/
|
||||
getStatus: function getStatus() {
|
||||
// console.log(`获取播放器状态,包含的值`,this.player.fullscreenService && this.player.fullscreenService.getStatus());
|
||||
return this.player.fullscreenService && this.player.fullscreenService.getStatus();
|
||||
// console.log(`获取播放器状态,包含的值`,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus());
|
||||
return this.player && this.player.fullscreenService && this.player.fullscreenService.getStatus();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -555,7 +555,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setLiveTimeRange: function setLiveTimeRange(beginTime, endTime) {
|
||||
// console.log(`设置直播的开始时间:${beginTime},结束时间:${endTime},开启直播时移功能时使用。`);
|
||||
this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);
|
||||
this.player && this.player.liveShiftSerivce && this.player.liveShiftSerivce.setLiveTimeRange(beginTime, endTime);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -565,7 +565,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setRotate: function setRotate(rotate) {
|
||||
// console.log(`参数为旋转角度:${rotate}。`);
|
||||
this.player.setRotate(rotate);
|
||||
this.player && this.player.setRotate(rotate);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -573,8 +573,8 @@ var staticRenderFns = []
|
||||
* @return rotate 旋转角度
|
||||
*/
|
||||
getRotate: function getRotate() {
|
||||
// console.log(`获取旋转角度:${this.player.getRotate()}`);
|
||||
return this.player.getRotate();
|
||||
// console.log(`获取旋转角度:${this.player && this.player.getRotate()}`);
|
||||
return this.player && this.player.getRotate();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -584,7 +584,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setImage: function setImage(image) {
|
||||
// console.log(`设置镜像:${image}。`);
|
||||
this.player.setImage(image);
|
||||
this.player && this.player.setImage(image);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -592,7 +592,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
dispose: function dispose() {
|
||||
// console.log(`播放器销毁。`);
|
||||
this.player.dispose();
|
||||
this.player && this.player.dispose();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -601,7 +601,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setCover: function setCover(cover) {
|
||||
// console.log(`设置封面:${cover}`);
|
||||
this.player.setCover(cover);
|
||||
this.player && this.player.setCover(cover);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -610,7 +610,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setProgressMarkers: function setProgressMarkers(markers) {
|
||||
// console.log(`markers打点数据集合:${markers}`);
|
||||
this.player.setProgressMarkers(markers);
|
||||
this.player && this.player.setProgressMarkers(markers);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -619,7 +619,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
setPreviewTime: function setPreviewTime(time) {
|
||||
// console.log(`设置试看时间,单位为:${time}秒`);
|
||||
this.player.setPreviewTime(time);
|
||||
this.player && this.player.setPreviewTime(time);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -627,8 +627,8 @@ var staticRenderFns = []
|
||||
* @return rotate 旋转角度
|
||||
*/
|
||||
getPreviewTime: function getPreviewTime() {
|
||||
// console.log(`获取试看时间:${this.player.getPreviewTime()}`);
|
||||
return this.player.getPreviewTime();
|
||||
// console.log(`获取试看时间:${this.player && this.player.getPreviewTime()}`);
|
||||
return this.player && this.player.getPreviewTime();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -636,7 +636,7 @@ var staticRenderFns = []
|
||||
*/
|
||||
isPreview: function isPreview() {
|
||||
// console.log(`是否试看`);
|
||||
this.player.isPreview();
|
||||
this.player && this.player.isPreview();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -644,8 +644,13 @@ var staticRenderFns = []
|
||||
* @param handle 回调方法
|
||||
*/
|
||||
off: function off(ev, handle) {
|
||||
this.player.off(ev, handle);
|
||||
this.player && this.player.off(ev, handle);
|
||||
}
|
||||
},
|
||||
beforeDestroy: function beforeDestroy() {
|
||||
//防止重复创建,需要销毁原来的播放器
|
||||
console.log('beforeDestroy');
|
||||
this.player && this.player.dispose();
|
||||
}
|
||||
});
|
||||
// CONCATENATED MODULE: ./packages/AliplayerV2/src/main.vue?vue&type=script&lang=js&
|
||||
|
2
lib/vue-aliplayer-v2.umd.min.js
vendored
2
lib/vue-aliplayer-v2.umd.min.js
vendored
File diff suppressed because one or more lines are too long
@ -480,7 +480,7 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeDestroy(){ //防止重复创建,需要销毁原来的播放器
|
||||
console.log('beforeDestroy');
|
||||
// console.log('beforeDestroy');
|
||||
this.player && this.player.dispose();
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user