<script>
export default {
  name: "player",
  data(){
    return {
      url: null
    }
  },
  onLoad(){
    // 打开此页面之前，请将需要查看的媒体文件列表放到 uni.PLAYER_URL 中
    this.url = uni.PLAYER_URL
    if(!this.url){
      return uni.showModal({
        title:this.$t('提示'),
        content: this.$t('暂无可查看内容'),
        showCancel:false,
        success(){
          uni.navigateBack()
        }
      })
    }
  }
};
</script>

<template>
  <view>
    <video v-if="!!url" :src="url" autoplay controls></video>
  </view>
</template>

<style scoped lang="scss">
page,view,video {
    width: 100%;
    height: 100%;
  }
</style>
