1
0
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:
Martin D. 2013-05-11 08:18:16 -03:00
parent 0e4f3cfa08
commit 9e65eb3618

View File

@ -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);
``` ```