1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-10 23:30:03 +02:00

Merge pull request #506 from martinduparc/patch-1

"addEvent" and "removeEvent" were replaced by "on" and "off"
This commit is contained in:
Steve Heffernan 2013-05-11 09:42:52 -07:00
commit 623ea7bb0f

View File

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