Skip to content

Commit

Permalink
Load plugins before controls
Browse files Browse the repository at this point in the history
For issue videojs#1980
  • Loading branch information
bc-bbay committed Apr 27, 2015
1 parent 232daae commit 91c81a4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ class Player extends Component {
// Cache for video property values.
this.cache_ = {};

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

// Set poster
this.poster_ = options['poster'] || '';

Expand Down Expand Up @@ -127,12 +134,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 91c81a4

Please sign in to comment.