mirror of
https://github.com/langyuxiansheng/vue-aliplayer-v2.git
synced 2025-04-05 19:41:39 +08:00
修复报错
This commit is contained in:
parent
100c2e4443
commit
99602344ff
@ -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和优化局部的引用方式
|
||||
|
||||
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -12,7 +12,7 @@ export default {
|
||||
},
|
||||
source: { //播放源(此属性存在则优先于options.source) 动态切换,目前只支持同种格式(mp4/flv/m3u8)之间切换。暂不支持直播rtmp流切换。
|
||||
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();
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user