VUE使用video-player视频插件 页面滚动出现脱离文档流

h5播放video在android中滚动的时候脱离文档流怎么解决?

如下我的代码:

<div class="audiobox">

    <video-player class="video-player vjs-custom-skin"
                  ref="videoPlayer"
                  :playsinline="true"
                  :options="playerOptions">
    </video-player>
 </div>
 
 
         playerOptions: {
              
                        playbackRates: [0.5, 1.0, 1.5, 2.0], 
                        autoplay: false, 
                        muted: false, 
                        autoplay: true,
                        loop: false, 
                        preload: 'auto', 
                        language: 'zh-CN', 
                        aspectRatio: '16:9',
                        fluid: true,
                        sources: [{
                            type: "video/mp4",
                            src: videourl 
                        }],
                        poster: videoimg, 
                        notSupportedMessage: '此视频暂无法播放,请稍后再试',
                        controlBar: {
                            timeDivider: true,
                            durationDisplay: true,
                            remainingTimeDisplay: false, 
                            fullscreenToggle: true  
                        }
                    }
                    
                }
                

},

阅读 3.5k
3 个回答
新手上路,请多包涵

前端大佬们 没有没有遇到过的

检查脱离文档流的那块视频的样式是否被 fixed 了等,然后写样式将它覆盖掉。

好像需要在video标签上添加x5-video-player-type="h5"属性,之前遇到过,但做好后没整理,现在也记不太清了。
记住, 是加在video标签上,不是video-player,用js加

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题