xgplayer
xgplayer copied to clipboard
uniapp 使用 xgplayer属性 fluid: true黑屏,fluid: fasle,播放器容器比当前屏幕大很多,无法完全显示视频
换个插件 哥哥
3版视频尺寸和封面尺寸有点问题,不要使用fluid,已经给官方反馈了,目前我在uniapp中处理方式如下:
- 视频无法充满容器,经个人测试设置fitVideoSize和videoFillMode无效,样式覆盖无效
解决方法:设置
videoAttributes:{width:'100'%,height:'100%'}
,直接修改原视频属性 - poster封面无法充满容器,导致视频可能漏一部分,比较难看,原因是官方样式中
background-size:100% auto
解决方法:个人测试样式覆盖无效,直接修改官方样式文件,调整为background-size:100% 100%
我是根据上面大哥 也是直接给video 加原生样式了
if(this.isMobileDevice){
videoAttributes={
crossOrigin: "anonymous",
style:width:${this.width};height:${this.height};position:absolute;top:0;left:0;
}
}else{
videoAttributes={
crossOrigin: "anonymous",
}
}
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!