zhychen
zhychen
  • 发布:2021-04-22 15:43
  • 更新:2021-09-09 14:07
  • 阅读:618

【报Bug】ios端hbuilder调试 video组件 时间按钮样式飞了

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: win10

HBuilderX类型: 正式

HBuilderX版本号: 3.1.9

手机系统: iOS

手机系统版本号: IOS 14

手机厂商: 苹果

手机机型: iphone11

页面类型: vue

打包方式: 离线

项目创建方式: HBuilderX

示例代码:

此代码只是 hellow uni-app 项目 video.nuve 的代码 多加了连个隐藏button

<template>  
    <div>  
        <video id='video1' class="video" :src="src" autoplay="false" duration="" controls="true" :danmu-list="list"  
            danmu-btn="false" enable-danmu="true" :loop="true" muted="true" initial-time="" direction="-90"  
            show-mute-btn="false" @play="onstart" @pause="onpause" @ended="onfinish" @error="onfail" @waiting="waiting"  
            @timeupdate="timeupdate" @fullscreenchange="fullscreenchange" show-fullscreen-btn="false"></video>  
        <button class="btn" @click="play">播放</button>  
        <button class="btn" @click="pause">暂停</button>  
        <button class="btn" @click="seek">跳转到指定位置</button>  
        <button class="btn" @click="stop">停止</button>  
        <button class="btn" @click="fullScreen">全屏</button>  
        <button class="btn" @click="exitFullScreen">退出全屏</button>  
        <button class="btn" @click="playbackRate">设置倍速</button>  
        <button class="btn" @click="sendDanmu">发送弹幕</button>  
    </div>  
</template>  

<script>  
    export default {  
        data: {  
            src: "https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20181126-lite.m4v",  
            fil: true,  
            list: [{  
                text: '要显示的文本',  
                color: '#FF0000',  
                time: 9  
            }]  
        },  
        onReady() {  
            this.context = uni.createVideoContext("video1", this);  
        },  
        methods: {  
            onstart(e) {  
                console.log("onstart:" + JSON.stringify(e));  
            },  
            onpause(e) {  
                console.log("onpause:" + JSON.stringify(e));  
            },  
            onfinish(e) {  
                console.log("onfinish:" + JSON.stringify(e));  
            },  
            onfail(e) {  
                console.log("onfail:" + JSON.stringify(e));  
            },  
            fullscreenchange(e) {  
                console.log("fullscreenchange:" + JSON.stringify(e));  
            },  
            waiting(e) {  
                console.log("waiting:" + JSON.stringify(e));  
            },  
            timeupdate(e) {  
                console.log("timeupdate:" + JSON.stringify(e));  
            },  

            play() {  
                this.context.play();  
            },  
            pause() {  
                this.context.pause();  
            },  
            seek() {  
                this.context.seek(20);  
            },  
            stop() {  
                this.context.stop();  
            },  
            fullScreen() {  
                this.context.requestFullScreen({  
                    direction: 90  
                });  
            },  
            exitFullScreen() {  
                this.context.exitFullScreen();  
            },  
            sendDanmu() {  
                this.context.sendDanmu({  
                    text: '要显示的弹幕文本',  
                    color: '#FF0000'  
                });  
            },  
            playbackRate() {  
                this.context.playbackRate(2);  
            }  
        }  
    }  
</script>  

<style>  
    .video {  
        width: 750rpx;  
        /* #ifdef H5 */  
        width: 100%;  
        /* #endif */  
        height: 400rpx;  
        background-color: #808080;  
    }  

    .btn {  
        margin-top: 5px;  
        margin-bottom: 5px;  
    }  
</style>

操作步骤:

hbuilder X 调试和 xcode 调试都有这个问题

预期结果:

最右侧总时间 样式和前面时间水平保持一致

实际结果:

最右侧总时间 样式飞了

bug描述:

用的 uniapp 自带的 hellow uni-app 项目,手机调试ios端 video的页面 将video 组件按钮除了control其他都隐藏后 时间进度条时间样式飞了

<video id='video1' class="video" :src="src" autoplay="false" duration="" controls="true" :danmu-list="list"  
            danmu-btn="false" enable-danmu="true" :loop="true" muted="true" initial-time="" direction="-90"  
            show-mute-btn="false" show-fullscreen-btn="false"></video>

样式见附件截图

2021-04-22 15:43 负责人:天生DR 分享
已邀请:
4***@qq.com

4***@qq.com

请问解决了吗

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