mirror of
https://github.com/videojs/video.js.git
synced 2025-01-15 10:39:58 +02:00
"addEvent" and "removeEvent" were replaced by "on" and "off"
This commit is contained in:
parent
0e4f3cfa08
commit
9e65eb3618
@ -195,12 +195,12 @@ var myFunc = function(){
|
|||||||
var myPlayer = this;
|
var myPlayer = this;
|
||||||
// Do something when the event is fired
|
// Do something when the event is fired
|
||||||
};
|
};
|
||||||
myPlayer.addEvent("eventName", myFunc);
|
myPlayer.on("eventName", myFunc);
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also remove the listeners later.
|
You can also remove the listeners later.
|
||||||
```js
|
```js
|
||||||
myPlayer.removeEvent("eventName", myFunc);
|
myPlayer.off("eventName", myFunc);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user