7***@qq.com
7***@qq.com
  • 发布:2020-09-08 16:19
  • 更新:2021-08-14 17:05
  • 阅读:788

带有滚动条的页面,含有video,滚动页面,video没有一起滚动

分类:HTML5+
            let top = document.getElementById('videoPlayer').parentElement.getBoundingClientRect().top;  
            //console.log(top);  
            //console.log(JSON.stringify(videoPlayer));  
            top = top + 'px';  
            videoPlayer = plus.video.getVideoPlayerById('videoPlayer');  
            if (!videoPlayer) {  
                videoPlayer = new plus.video.createVideoPlayer('videoPlayer', {  
                    src: videoUrl,  
                    top: top,  
                    left: '3%',  
                    width: '94%',  
                    height: '200px',  
                    position:'static'  
                });  
                plus.webview.currentWebview().append(videoPlayer);  
            } else {  
                _that.closeVideo();  
                videoPlayer = new plus.video.createVideoPlayer('videoPlayer', {  
                    src: videoUrl,  
                    top: top,  
                    left: '3%',  
                    width: '94%',  
                    height: '200px',  
                    position:'static'  
                });  
                plus.webview.currentWebview().append(videoPlayer);  
            }  

            videoPlayer.addEventListener('fullscreenchange', function (e) {  
                if (e.detail.fullScreen) {  
                    plus.screen.lockOrientation('landscape');  
                } else {  
                    plus.screen.lockOrientation('portrait');  
                }  
            }, false);  

           closeVideo = () => {  
               if (videoPlayer) {  
                   videoPlayer.close();  
                   videoPlayer = null;  
                   plus.webview.currentWebview().remove(videoPlayer);  
               }  
           };
2020-09-08 16:19 负责人:无 分享
已邀请:
CLP

CLP

HX什么版本的

CLP

CLP

iOS还是安卓?

chentiaotiao

chentiaotiao

兄弟解决了吗?我和你的问题一模一样

该问题目前已经被锁定, 无法添加新回复