mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
add proxy() to instance
This commit is contained in:
1 parent
177ded8c2c
commit
47128ecf9d
44 files changed
+164
-109
No files matched your search
@@ -100,6 +100,32 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
## events
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
Manage the `events`
|
||||
|
||||
## proxy
|
||||
|
||||
- Type: `Function`
|
||||
|
||||
Proxy native event method, easy to manage and destroy the event
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var container = document.querySelector('.artplayer-app');
|
||||
var art = new Artplayer({
|
||||
container: container,
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.proxy(container, 'click', (event) => {
|
||||
console.info(event);
|
||||
});
|
||||
```
|
||||
|
||||
## storage
|
||||
|
||||
- Type: `Object`
|
||||
|
||||
@@ -100,6 +100,32 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
## events
|
||||
|
||||
- 类型: `Object`
|
||||
|
||||
管理事件发生的对象
|
||||
|
||||
## proxy
|
||||
|
||||
- 类型: `Function`
|
||||
|
||||
代理原生事件的方法,便于事件的管理与销毁
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
```js
|
||||
var container = document.querySelector('.artplayer-app');
|
||||
var art = new Artplayer({
|
||||
container: container,
|
||||
url: '/assets/sample/video.mp4',
|
||||
});
|
||||
|
||||
art.proxy(container, 'click', (event) => {
|
||||
console.info(event);
|
||||
});
|
||||
```
|
||||
|
||||
## storage
|
||||
|
||||
- 类型: `Object`
|
||||
|
||||
Reference in new issue
Block a user