Update Properties.md

This commit is contained in:
Harvey committed 2021-11-26 15:15:20 +08:00
1 parent 565a4c3216
commit a6fe955fe8
1 file changed
+26 -1
@@ -487,4 +487,29 @@ art.on('ready', () => {
art.autoSize = true;
console.info(art.autoSize);
})
```
```
## rect
- 类型: `Getter`
获取播放器的尺寸和坐标信息
<div className="run-code">▶ Run Code</div>
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
});
art.on('ready', () => {
console.info(JSON.stringify(art.rect));
})
```
:::tip 提示
尺寸和坐标信息是通过 `getBoundingClientRect` 获取的
:::