<template>
<view>
<view class="page-body">
<view class="page-section">
<video id="myVideo" :src="src" autoplay="true" @ended="replay"></video>
</view>
</view>
</view>
</template>
<script>
import pageHead from '../../components/page-head.vue'
export default {
data() {
return {
src: '',
height: '',
width: ''
}
},
onReady: function() {
uni.getStorage({
key: 'src',
success: function(res) {
console.log(res.data);
if(res.data){
this.src=res.data;
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen();
}
}
});
},
methods: {
replay: function(e) {
if (e) {
this.videoContext.exitFullScreen({
})
uni.redirectTo({
url: '../replay/replay'
});
}
}
},
components: {
pageHead
}
}
</script>
<style>
@import "../../common/uni.css";
button {
background-color: #007aff;
color: #ffffff;
}
.uni-list {
margin-top: 40px;
}
.uni-input {
text-align: left;
}
.page-section {
text-align: center;
}
</style>
0 个回复