mirror of
https://github.com/videojs/video.js.git
synced 2025-01-06 06:50:51 +02:00
Merge branch 'feature/event-binding-return-player'
This commit is contained in:
commit
b0061f0e30
@ -1,3 +1,4 @@
|
|||||||
|
* Event binders (on/off/one) now return the player instance
|
||||||
* Stopped player from going back to beginningg on ended event.
|
* Stopped player from going back to beginningg on ended event.
|
||||||
* Added support for percent width/height and fluid layouts
|
* Added support for percent width/height and fluid layouts
|
||||||
* Improved load order of elements to reduce reflow.
|
* Improved load order of elements to reduce reflow.
|
||||||
|
@ -171,25 +171,29 @@ _V_.Component = _V_.Class.extend({
|
|||||||
/* Events
|
/* Events
|
||||||
================================================================================ */
|
================================================================================ */
|
||||||
on: function(type, fn, uid){
|
on: function(type, fn, uid){
|
||||||
return _V_.on(this.el, type, _V_.proxy(this, fn));
|
_V_.on(this.el, type, _V_.proxy(this, fn));
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
// Deprecated name for 'on' function
|
// Deprecated name for 'on' function
|
||||||
addEvent: function(){ return this.on.apply(this, arguments); },
|
addEvent: function(){ return this.on.apply(this, arguments); },
|
||||||
|
|
||||||
off: function(type, fn){
|
off: function(type, fn){
|
||||||
return _V_.off(this.el, type, fn);
|
_V_.off(this.el, type, fn);
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
// Deprecated name for 'off' function
|
// Deprecated name for 'off' function
|
||||||
removeEvent: function(){ return this.off.apply(this, arguments); },
|
removeEvent: function(){ return this.off.apply(this, arguments); },
|
||||||
|
|
||||||
trigger: function(type, e){
|
trigger: function(type, e){
|
||||||
return _V_.trigger(this.el, type, e);
|
_V_.trigger(this.el, type, e);
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
// Deprecated name for 'off' function
|
// Deprecated name for 'off' function
|
||||||
triggerEvent: function(){ return this.trigger.apply(this, arguments); },
|
triggerEvent: function(){ return this.trigger.apply(this, arguments); },
|
||||||
|
|
||||||
one: function(type, fn) {
|
one: function(type, fn) {
|
||||||
_V_.one(this.el, type, _V_.proxy(this, fn));
|
_V_.one(this.el, type, _V_.proxy(this, fn));
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Ready - Trigger functions when component is ready
|
/* Ready - Trigger functions when component is ready
|
||||||
|
Loading…
Reference in New Issue
Block a user