1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-04 06:48:49 +02:00

Merge branch 'feature/disable-components'

This commit is contained in:
Steve Heffernan 2012-06-28 16:37:26 -07:00
commit 5758472d2f
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,4 @@
* Allow disabling of default components
* Duration is now setable (need ed for HLS m3u8 files)
* Event binders (on/off/one) now return the player instance
* Stopped player from going back to beginningg on ended event.

View File

@ -77,6 +77,10 @@ _V_.Component = _V_.Class.extend({
// Loop through components and add them to the player
this.eachProp(options.components, function(name, opts){
// Allow for disabling default components
// e.g. _V_.options.components.posterImage = false
if (opts === false) return;
// Allow waiting to add components until a specific event is called
var tempAdd = this.proxy(function(){
// Set property name on player. Could cause conflicts with other prop names, but it's worth making refs easy.