修复报错

This commit is contained in:
zhouliujun 2020-04-01 15:56:11 +08:00
parent 100c2e4443
commit 99602344ff
4 changed files with 13 additions and 3 deletions

View File

@ -375,6 +375,9 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
## 更新日志
> v1.1.8 修复播放源(增加source属性类型错误),修复获取播放器状态 getStatus()方法报错, 感谢"kongjigu"网友的反馈.
> v1.1.7 增加动态切换播放源(增加source属性)功能 感谢"wikimo"和"jieruian"两位网友的反馈建议.
> v1.1.6 修复部分已知bug和优化局部的引用方式

View File

@ -10,6 +10,7 @@
<span @click="replay()">重播</span>
<span @click="getCurrentTime()">播放时刻</span>
<span @click="show = !show">{{ show ? '销毁' : '重载' }}</span>
<span @click="getStatus()">获取播放器状态</span>
</div>
<div class="source-box">
<span class="source-label">选择播放源(支持动态切换):</span>
@ -55,6 +56,12 @@ export default {
getCurrentTime(){
this.$refs.VueAliplayerV2.getCurrentTime();
},
getStatus(){
const status = this.$refs.VueAliplayerV2.getStatus();
console.log(`getStatus:`, status);
alert(`getStatus:${status}`);
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "vue-aliplayer-v2",
"version": "1.1.7",
"version": "1.1.8",
"author": "yxs",
"description": "感谢每一位开源的开发者. 这是一个基于Alipayer 开发并封装成vue组件的播放器.",
"main":"lib/vue-aliplayer-v2.umd.min.js",

View File

@ -12,7 +12,7 @@ export default {
},
source: { //(options.source) ,mp4/flv/m3u8rtmp
required: false,
type: [Object],
type: [String],
default: () => null
},
id:{
@ -385,7 +385,7 @@ export default {
*/
getStatus(){
// console.log(``,this.player && this.player.fullscreenService && this.player && this.player.fullscreenService.getStatus());
return this.player && this.player.fullscreenService && this.player.fullscreenService.getStatus();
return this.player && this.player.getStatus();
},
/**