mirror of
https://github.com/videojs/video.js.git
synced 2024-12-27 02:43:45 +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;
|
||||
// Do something when the event is fired
|
||||
};
|
||||
myPlayer.addEvent("eventName", myFunc);
|
||||
myPlayer.on("eventName", myFunc);
|
||||
```
|
||||
|
||||
You can also remove the listeners later.
|
||||
```js
|
||||
myPlayer.removeEvent("eventName", myFunc);
|
||||
myPlayer.off("eventName", myFunc);
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user