From e0b0fb76862d066c46be8440f6809d6f01dcfe03 Mon Sep 17 00:00:00 2001 From: Brandon Bay Date: Wed, 29 Apr 2015 10:58:48 -0400 Subject: [PATCH] Load plugins before controls For issue #1980 --- src/js/player.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/js/player.js b/src/js/player.js index 72dcbed13d..563d687c07 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -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 @@ -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;