Files
xdd-uniapp-new/pages/VideoPlayBackList/VideoPlayBackDetail.vue
T
2023-09-20 21:49:33 +08:00

48 lines
848 B
Vue

<template>
<view class="">
<video class="video" :show-fullscreen-btn="false" id="myVideo" autoplay :src="curPlayVideoUrl" @error="videoErrorCallback" controls></video>
</view>
</template>
<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
export default {
components:{
uniPopup
},
data() {
return {
curPlayVideoUrl:'',
isVideoPopupShow:false
}
},
onReady: function(res) {
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen();
},
onLoad:function(e){
this.curPlayVideoUrl = e.videoUrl;
//this.$refs.popup.open();
},
methods: {
videoErrorCallback: function(e) {
uni.showModal({
content: e.target.errMsg,
showCancel: false
})
}
}
};
</script>
<style scoped>
.video{
height: 100vh;
width: 100vw;
}
</style>