<template>
	<view class="container">
		<view class="videoBox">
			<video id="myVideo"  :style="{width: '100%', height: '100%'}"
           :src="video_src" @error="videoErrorCallback" :autoplay="false"  controls></video>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				old_url:'',
				video_src:'',
			}
		},
		onLoad(option) {
			//数据
			var _this =this;
			var url = option.url;
			var title = option.title;
			if(_this.$com.isNull(url))
			{
				uni.navigateBack({
					delta:1,
				})
			}
			_this.old_url = url;
			_this.video_src = decodeURIComponent(url);
			if(!_this.$com.isNull(title))
			{
				var pageTitle = title;
				uni.setNavigationBarTitle({
					title:pageTitle,
				})
			}
			
		},
		methods: {
			videoErrorCallback(e)
			{
				console.log(e);
			},
		}
	}
</script>

<style lang="scss">
	page{ height:100%; width: 100%;}
	.container{width: 100%; height: 100%;}
	.videoBox{ width: 100%; height: 100%;}
</style>
