<template>
	<view class="content">
		<view class="one">
			<video :src="info.path" :page-gesture="true" :show-mute-btn="true" :play-strategy="2"></video>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				info: {},
			};
		},
		onLoad(e) {
			const that = this;
			that.$set(that, `id`, e.id || '63c89e92d4f6e2a2ec22d5c8');
			that.search()
		},
		methods: {
			async search() {
				const that = this;
				if (that.id) {
					let res = await that.$api(`program/${that.id}`, 'GET', {});
					if (res.errcode == '0') {
						that.$set(that, `info`, res.data);
						uni.setNavigationBarTitle({
							title: res.data.name
						});
					}
				}
			}
		}
	}
</script>

<style lang="scss">
	.content {
		.one {
			text-align: center;
			padding: 10px;

			video {
				width: 100%;
				height: 250px;
			}
		}


	}
</style>
