|
[已解决]
moviePlayer 模块 moviePlayer.addEventListener 以及返回全屏按钮问题
[复制链接]
本帖最后由 tt汤 于 2020-1-3 15:04 编辑
有些安卓机型点击不到有些可以,
不行机型:
诺基亚7
三星S8
vivoX21
addEventListener
点击放大和放大之后右下角返回放大按钮,以及右上角自定义按钮:
右下角的返回放大按钮点击没有效果。
和 customBtns
moviePlayer = api.require('moviePlayer');
moviePlayer.open({
rect:{
x: 0,
y: 0,
w:api.winWidth,
h:200
},
texts: {
title:api.pageParam.section_name
},
styles:{
head:{
bg: 'rgba(0,0,0,0)',
height: 44,
y:20,
title:{
size:20,
color:'#fff',
width:100,
leftMargin:50
},
backSize: 20,
backImg:'widget://image/video/white_arrow.png',
customButtons:[{
w:17,
h:20,
rightMagin:14,
img:'widget://image/video/right1.png',
imgSelected:'widget://image/video/right1.png',
}]},
foot:{
bg: 'rgba(0,0,0,0.5)',
height: 44,
palyBtn:{
size: 20,
playImg:'widget://image/video/play.png',
pauseImg:'widget://image/video/play2.png',
marginLeft:5
},
currentTimeLabel:{
textSize:14,
textColor:"#FFF",
textWidth: 43,
marginLeft:5
},
seekBar:{
sliderImg:'widget://image/circle.png',
sliderW : 20,
sliderH : 20,
progressColor: 'rgba(255,255,255,0.4)',
progressSelected: 'rgba(255,255,255,1)',
marginLeft:10,
marginRight:10
},
totalTimeLabel:{
textSize:14,
textColor:"#FFF",
textWidth: 43,
marginRight:5
},
fullscreenBtn:{
size:20,
verticalImg:'widget://image/video/right2.png',
horizontalImg:'widget://image/video/right22.png',
}
}
},
path:'http://qiniu.youwang.online/1571111246241.mp4',
autoPlay: true,
autorotation:false,
useGestureControl:false,
isShowControlView:true,
},function(ret, err){
console.log("||||"+JSON.stringify(ret))
if(ret){
isPlay=true;
moviePlayer.addEventListener(function(ret){
console.log(JSON.stringify(ret));
if(ret && ret.eventType == 'back'){
// alert('点击back按钮'+JSON.stringify(ret));
api.closeWin();
}else if(ret && ret.eventType == 'customBtns'){
alert('下载'+JSON.stringify(ret));
}
});
}
});
|
|