<template>
	<view class="bg">
		<video :src="showImg(src)" controls class="myVideo" :poster="poster"></video>
		<!-- <view class="title">
			{{title}}
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '',
				poster: '',
				title: ''
			}
		},
		onLoad(option) {
			// const item = JSON.parse(decodeURIComponent(option.item));
			this.src = option.videoSrc
			// this.poster = item.image
			// this.title = item.title
		},
		onReady() {
			// uni.setNavigationBarTitle({
			// 	title: this.title
			// })
		}
	}
</script>

<style scoped lang="scss">
	.bg {
		width: 100%;
		height: 100vh;
		position: relative;
	}
	
	.myVideo {
		width: 100%;
		height: 100vh;
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
	}
	
	.title {
		width: 699rpx;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 29rpx;
		color: #FFFFFF;
		position: fixed;
		left: 28rpx;
		bottom: 140rpx;
	}
</style>