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

【报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 负责人:无 分享
已邀请:

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

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容