Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load plugins before controls #2094

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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