mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
add autoOrientation state
This commit is contained in:
1 parent
b292b769bd
commit
b86fb446b0
55 files changed
+233
-172
No files matched your search
@@ -1074,4 +1074,21 @@ var art = new Artplayer({
|
||||
autoplay: true,
|
||||
autoPlayback: true,
|
||||
});
|
||||
```
|
||||
|
||||
## autoOrientation
|
||||
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
Whether to rotate the player according to the video size and viewport size, when the player web-fullscreen in mobile
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
autoOrientation: true,
|
||||
});
|
||||
```
|
||||
@@ -1076,3 +1076,20 @@ var art = new Artplayer({
|
||||
autoPlayback: true,
|
||||
});
|
||||
```
|
||||
|
||||
## autoOrientation
|
||||
|
||||
- 类型: `Boolean`
|
||||
- 默认: `false`
|
||||
|
||||
是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
autoOrientation: true,
|
||||
});
|
||||
```
|
||||
Reference in new issue
Block a user