49 lines
990 B
Vue
49 lines
990 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'
|
|
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
|
export default {
|
|
components:{
|
|
uniPopup
|
|
},
|
|
mixins: [pageListenMixins],
|
|
data() {
|
|
return {
|
|
curPlayVideoUrl:'',
|
|
isVideoPopupShow:false,
|
|
pageKeyId: ''
|
|
}
|
|
},
|
|
onReady: function(res) {
|
|
this.videoContext = uni.createVideoContext('myVideo');
|
|
this.videoContext.requestFullScreen();
|
|
},
|
|
onLoad:function(e){
|
|
this.curPlayVideoUrl = e.videoUrl
|
|
const id = options.id
|
|
this.pageKeyId = `findVideo_videoId_${id}`
|
|
},
|
|
methods: {
|
|
videoErrorCallback: function(e) {
|
|
uni.showModal({
|
|
content: e.target.errMsg,
|
|
showCancel: false
|
|
})
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
.video{
|
|
height: 100vh;
|
|
width: 100vw;
|
|
}
|
|
|
|
</style>
|