提交 1b7f87c2 编写于 作者: glod-money-money's avatar glod-money-money

update:更新

上级 874609e3
...@@ -49,7 +49,7 @@ export default class AppRawItemVideo extends Vue { ...@@ -49,7 +49,7 @@ export default class AppRawItemVideo extends Vue {
* *
* @memberof AppRawItemVideo * @memberof AppRawItemVideo
*/ */
@Watch('videoParmas') @Watch('videoParmas',{immediate:true,deep:true})
onVideoParmasChange(newVal: any, oldVal: any) { onVideoParmasChange(newVal: any, oldVal: any) {
this.handleStaticVideo(); this.handleStaticVideo();
} }
...@@ -111,6 +111,10 @@ export default class AppRawItemVideo extends Vue { ...@@ -111,6 +111,10 @@ export default class AppRawItemVideo extends Vue {
showcontrols: false showcontrols: false
}; };
created(){
this.handleStaticVideo();
}
/** /**
* 处理静态视频播放 * 处理静态视频播放
* *
...@@ -120,7 +124,11 @@ export default class AppRawItemVideo extends Vue { ...@@ -120,7 +124,11 @@ export default class AppRawItemVideo extends Vue {
if (this.videoParmas && this.videoParmas.length > 0) { if (this.videoParmas && this.videoParmas.length > 0) {
const rawParams: any = {}; const rawParams: any = {};
this.videoParmas.forEach((param: any) => { this.videoParmas.forEach((param: any) => {
if(param.key == 'autoplay' || param.key == 'replay' ||param.key == 'showcontrols'){
rawParams[param.key] = param.value == "1" ? true : false;
}else{
rawParams[param.key] = param.value; rawParams[param.key] = param.value;
}
}) })
Object.assign(this.playerParams, rawParams); Object.assign(this.playerParams, rawParams);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册