Init project
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user