Skip to content

Commit

Permalink
@bc-bbay Load plugins before controls. closes #2094
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-bbay authored and dmlap committed Apr 29, 2015
1 parent 013d59d commit 4fa6a94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CHANGELOG
* @forbesjo added the `scrubbing` property ([view](/~https://github.com/videojs/video.js/pull/2080))
* @heff switched to border-box sizing for all player elements ([view](/~https://github.com/videojs/video.js/pull/2082))
* @forbesjo added a vjs-button class to button controls ([view](/~https://github.com/videojs/video.js/pull/2084))
* @bc-bbay Load plugins before controls ([view](/~https://github.com/videojs/video.js/pull/2094))

--------------------

Expand Down
14 changes: 8 additions & 6 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ class Player extends Component {
this.scrubbing_ = false;

this.el_ = this.createEl();

// Load plugins
if (options['plugins']) {
Lib.obj.each(options['plugins'], function(key, val){
this[key](val);
}, this);
}

this.initChildren();

// Set isAudio based on whether or not an audio tag was used
Expand Down Expand Up @@ -138,12 +146,6 @@ class Player extends Component {
// Make player easily findable by ID
Player.players[this.id_] = this;

if (options['plugins']) {
Lib.obj.each(options['plugins'], function(key, val){
this[key](val);
}, this);
}

// When the player is first initialized, trigger activity so components
// like the control bar show themselves if needed
this.userActive_ = true;
Expand Down

0 comments on commit 4fa6a94

Please sign in to comment.