帖子
帖子
用户
博客
课程
显示全部楼层
7
帖子
0
勋章
2112
Y币

[插件开发] movieplayer进入全屏播放器不占满屏幕?

[复制链接]
发表于 2021-3-14 10:44:10



movieplayer竖屏正常播放 其他事件也正常,但是点击进入全屏播放器不占满屏幕咋回事?statusBarAppearance 设置为false

测试环境为安卓


竖屏正常 014.png

横屏状态不占满屏幕 015.png


横屏状态不占满屏幕 017.png

76
帖子
0
勋章
2613
Y币
用示例代码试下,我这边测试没问题的
7
帖子
0
勋章
2112
Y币
XT1991 发表于 2021-3-14 11:54
用示例代码试下,我这边测试没问题的

用的就是示例代码



        moviePlayer.open({
            rect: {
                x: 0,
                y: headerH,
                w: winWidth,
                h: winWidth * 0.65
            },
            texts: {
                title: v_title //(可选项)字符串类型;顶部标题文字
            },
            centerPlayBtn:{
              size:30,                                // 数字类型;按钮大小;默认:30
                  iconPath:'widget://image/centerPlay.png'  // 字符串类型;图标路径;
                    },
            styles: {
                head: {
                    bg: 'rgba(161,161,161,0.5)',
                    height: 44,
                    y: 2,
                    title: {
                        size: 20,
                        color: '#fff',
                        width: 300,
                        leftMargin: 10
                    },
                    backSize: 25,
                    backImg: 'widget://image/back.png',


                },
                foot: {
                    bg: 'rgba(0,0,0,0.5)',
                    height: 44,
                    palyBtn: {
                        size: 20,
                        playImg: 'widget://image/play.png',
                        pauseImg: 'widget://image/pause.png',
                        marginLeft: 10
                    },
                    currentTimeLabel: {
                        textSize: 14,
                        textColor: "#FFF",
                        textWidth: 43,
                        marginLeft: 5
                    },
                    seekBar: {
                        sliderImg: 'widget://image/circle.png',
                        sliderW: 20,
                        sliderH: 20,
                        progressColor: '#696969',
                        progressSelected: '#76EE00',
                        marginLeft: 10,
                        marginRight: 10
                    },
                    totalTimeLabel: {
                        textSize: 14,
                        textColor: "#FFF",
                        textWidth: 43,
                        marginRight: 8
                    },
                    fullscreenBtn: {
                        size: 20,
                        verticalImg: 'widget://image/full.png',
                        horizontalImg: 'widget://image/exetfull.png',
                    }
                }
            },
            path: v_url,
            showBack: false,
            autorotation: false,
            fixed: true,
            autoPlay: true
        }, function(ret, err) {
            if (ret) {
                moviePlayer.show();

    } else {
                alert(JSON.stringify('播放器错误'));
            }


        });


76
帖子
0
勋章
2613
Y币
测试的可以全屏,看下代码有什么问题?

var moviePlayer = api.require('moviePlayer');
moviePlayer.open({
          rect:{
          x: 0,
          y: 0,
          w:api.frameWidth,
          h:300
          },
          styles:{
          head:{
          bg: 'rgba(161,161,161,0.5)',
          height: 44,
          y:20,
          title:{
          size:20,
          color:'#fff',
          width:40,
          leftMargin:10
          },
          backSize: 30,
          backImg:'widget://image/back.png',
          customButtons:[{
          w:30,
          h:30,
          rightMagin:10,
          img:'widget://image/image/collect.png',
          imgSelected:'fs://image/collectSelected.png',
          }]},
          foot:{  
          bg: 'rgba(0,0,0,0.5)',
          height: 44,
          palyBtn:{
          size: 20,
          playImg:'widget://image/play.png',
          pauseImg:'widget://image/pause.png',
          marginLeft:5
          },
          currentTimeLabel:{
          textSize:14,
          textColor:"#FFF",
          textWidth: 43,
          marginLeft:5
          },
          seekBar:{
          sliderImg:'widget://image/circle.png',
          sliderW : 20,
          sliderH : 20,
          progressColor: '#696969',
          progressSelected: '#76EE00',
          marginLeft:10,
          marginRight:10
          },
          totalTimeLabel:{
          textSize:14,
          textColor:"#FFF",
          textWidth: 43,
          marginRight:5
          },
          fullscreenBtn:{
          size:20,
          verticalImg:'widget://image/vertical.png',
          horizontalImg:'widget://image/horizontal.png',
          }
          } },
           path:'http://baobab**.**/1455782903700jy.mp4',
           autoPlay: true
            },function(ret, err){
                if(ret){
                    // alert(JSON.stringify(ret));
                // } else {
                    // alert(JSON.stringify(err));
                }

});
7
帖子
0
勋章
2112
Y币
经测试发现是机子型号不适配的问题。  折腾了好几天 小米10全屏白边,夜神模拟器也是一样,   最后测试别的安卓手机才发现是型号不适配
您需要登录后才可以回帖 登录

本版积分规则