是这样的
是这样的
  • 发布:2025-10-27 11:56
  • 更新:2025-10-27 11:56
  • 阅读:21

H5端项目,我将video标签中视频控制组件以及层级都有调整但是,在荣耀手机浏览器中还是最高层级同时视频控制组件也还在

分类:uni-app

源码

<template>  
  <view class="video-container">  
    <video  
        class="video-player"  
        :src="videoUrl"  
        :autoplay="true"  
        :loop="true"  
        :controls="false"  
        object-fit="contain"  
        playsinline  
        webkit-playsinline  
        :show-play-btn="false"  
        :show-center-play-btn="false"  
        :show-progress="false"  
        x5-playsinline  
        x5-video-player-type="h5"  
        x5-video-player-fullscreen="false"  
    >  
    </video>  
  </view>  
</template>  

<script>  
export default {  
  props:{  
    videoUrl:{  
      type:String,  
      default:''  
    }  
  },  
  data() {  
    return {};  
  }  
}  
</script>  

<style lang="scss">  
.video-container {  
  position: absolute;  
  top: 0;  
  left: 0;  
  width: 100%;  
  height: 100%;  
  z-index: 1;  
  .video-player {  
    width: 100%;  
    height: 100%;  
    object-fit: cover;  
    transform: translateZ(0);  
    -webkit-transform: translateZ(0);  

    &::after {  
      content: '';  
      position: absolute;  
      bottom: 0;  
      left: 0;  
      width: 100%;  
      height: 50px;   
      background: transparent;  
      pointer-events: none;  
    }  
  }  

}  

</style>

荣耀手机浏览器显示

QQ浏览器显示

2025-10-27 11:56 负责人:无 分享
已邀请:

要回复问题请先登录注册