y***@qq.com
y***@qq.com
  • 发布:2019-01-18 11:47
  • 更新:2020-04-28 14:41
  • 阅读:1798

plus.video.VideoPlayer 当 position:"absolute" 时 创建的提示在视频上方不显示

分类:HBuilder

plus.video.VideoPlayer 当设置 position:"absolute" 保持在屏幕页面顶部时
创建的提示在视频上方不显示,应该是被视频遮盖了
示例文件内的代码

var wsub = null;  
function createSubview(){  
    if(!wsub) {  
        var topoffset = document.getElementById('video').offsetTop;  
        wsub=plus.webview.create('video_videoplayer_sub.html','sub',{top:topoffset,height:'30px',position:'static',scrollIndicator:'none',background:'transparent'});  
        plus.webview.currentWebview().append(wsub);  
    }  
    wsub.isVisible()?wsub.hide():wsub.show();  
}

如果把上面代码的position:'static'改为 absolute的时候连视频区域也不见了
希望在创建的video上设置一个接口如setStyle一样,可以提示文字,位置,自动消失时间(或者动态控制)
还能自定义控制按钮的css样式

2019-01-18 11:47 负责人:无 分享
已邀请:
百倍

百倍

解决了吗

DCloud_App_Array

DCloud_App_Array

创建的是什么提示?如果H5的提示肯定会被视频控件盖住,可以使用plus.nativeUI.toast。

  • 百倍

    我希望在非全屏时,在视频上方,添加倍速切换的按钮。全屏时添加返回按钮和视频标题,要怎么实现?

    2020-04-29 14:23

  • DCloud_App_Array

    回复 百倍: 使用5+ API不支持自定义全屏后的内容,在uni-app中使用nvue可以支持。

    2020-05-06 15:31

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