<view class="video">
<video
id="myVideo"
:src="src"
controls
object-fit="fill"
v-show="!show"
@play="ctlPlay"
@pause="ctlPause"
@timeupdate="ctrTimeUpdate"
@fullscreenchange="ctlFullscreen"
>
<!-- <cover-view class="controls good">点赞</cover-view>
<cover-view class="controls say">留言</cover-view> -->
</video>
</view>
getVideo: function(data) {
let urlArr = that.$wxy.html.getMediaUrl(data, 'video');
console.log(urlArr);
if (urlArr.length == 0) {
this.$wxy.uniapi.toast('未找到视频,请查看是否上传视频');
return false;
}
if (urlArr[0].toLowerCase().indexOf('mp4') > 0 || urlArr[0].toLowerCase().indexOf('mov') > 0) {
this.videoContext.stop();
this.src = this.vuex_domain + urlArr[0];
} else this.$wxy.uniapi.toast('未找到视频,请查看上传视频是否符合要求');
},
1 个回复
DCloud_UNI_Anne
查看相关问题:https://ask.dcloud.net.cn/question/133605