2***@qq.com
2***@qq.com
  • 发布:2021-06-03 17:59
  • 更新:2021-06-03 17:59
  • 阅读:615

【报Bug】video组件的 direction属性为什么只能设置在全屏播放旋转,不能在非全屏的下设置旋转

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.1.13

手机系统: Android

手机系统版本号: Android 7.1.1

手机厂商: 模拟器

手机机型: 安卓

页面类型: vue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<template> <view class="content" :class="{content_active: isContent_Active}"> <video class="testVideo" class="{video_active: isVideo_Active}" ref="video"
poster="https://i.postimg.cc/Twd5mCxF/20210526102007.png"
src="http://103.148.127.241/media/static/video/video1.mp4"
controls
@fullscreenchange='full' direction="-90" >
<cover-view class="controls-title" @click="clickFull"></cover-view>
</video>
</view>
</template>

<script>
export default {
data() {
return {
isContent_Active: false,
isVideo_Active: false
}
},
onLoad() {

    },  
    methods: {  
        full(){  
            console.log('点击全屏按钮或者退出全屏')  
        },  
        clickFull(){  
            console.log(1111)  
            this.isVideo_Active = this.isContent_Active = !this.isContent_Active;  
        }  
    }  
}  

</script>

<style lang="less">
//默认横盘样式
.content{
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
.testVideo{
height: 100vw;
width: 100vh;
transform: rotate(90deg);
position: absolute;
transition: 0.4s;
.controls-title{
position: absolute;
right: 0;
bottom: 0;
width: 20px;
height: 20px;
background-color: red;
}
}
}
</style>

操作步骤:

直接打开应用

预期结果:

不管在全屏播放还是在非全屏播放都能旋转

实际结果:

不能旋转

bug描述:

video组件的 direction属性为什么只能设置在全屏播放旋转,不能在非全屏的下设置旋转

2021-06-03 17:59 负责人:无 分享
已邀请:

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