mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
update docs
This commit is contained in:
1 parent
2749d50209
commit
550aa0e7f2
95 files changed
+1734
-1828
No files matched your search
@@ -523,10 +523,9 @@ art.on('ready', () => {
|
||||
|
||||
## `autoSize`
|
||||
|
||||
- Type: `Setter/Getter`
|
||||
- Parameter: `Boolean`
|
||||
- Type: `Function`
|
||||
|
||||
设置视频是否自适应尺寸,设置为 `true` 之后它会只执行一次
|
||||
设置视频是否自适应尺寸
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -537,9 +536,7 @@ var art = new Artplayer({
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
console.info(art.autoSize);
|
||||
art.autoSize = true;
|
||||
console.info(art.autoSize);
|
||||
art.autoSize();
|
||||
});
|
||||
```
|
||||
|
||||
@@ -666,10 +663,9 @@ art.on('ready', () => {
|
||||
|
||||
## `autoHeight`
|
||||
|
||||
- Type: `Setter/Getter`
|
||||
- Parameter: `Boolean`
|
||||
- Type: `Function`
|
||||
|
||||
当容器只有宽度,该属性可以自动计算出并设置视频的高度,设置为 `true` 之后它会只执行一次
|
||||
当容器只有宽度,该属性可以自动计算出并设置视频的高度
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -680,11 +676,11 @@ var art = new Artplayer({
|
||||
});
|
||||
|
||||
art.on('ready', () => {
|
||||
art.autoHeight = true;
|
||||
art.autoHeight();
|
||||
});
|
||||
|
||||
art.on('resize', () => {
|
||||
art.autoHeight = true;
|
||||
art.autoHeight();
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user