Skip to content

Commit

Permalink
build version
Browse files Browse the repository at this point in the history
  • Loading branch information
benjipott committed Dec 28, 2016
1 parent 32ddbdf commit 8fc5c45
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 0 additions & 3 deletions es5/tech/Deezer.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ var Deezer = (function (_Externals) {
switch (state) {
case -1:
this.trigger('loadstart');
this.trigger('loadedmetadata');
this.trigger('durationchange');
this.trigger('waiting');
break;

Expand Down Expand Up @@ -169,7 +167,6 @@ var Deezer = (function (_Externals) {
});
this.widgetPlayer = DZ.player;
_get(Object.getPrototypeOf(Deezer.prototype), 'initTech', this).call(this);
this.onStateChange({ type: -1 });
}
}, {
key: 'setupTriggers',
Expand Down
4 changes: 3 additions & 1 deletion es5/tech/Externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ var Externals = (function (_Tech) {
key: 'initTech',
value: function initTech() {
this.setupTriggers();
this.onStateChange({ data: -1, type: -1 });
}
}, {
key: 'setupTriggers',
Expand Down Expand Up @@ -238,8 +239,9 @@ var Externals = (function (_Tech) {

case 'apiready':
this.trigger('loadedmetadata');
this.onReady();
this.trigger('canplay');
this.trigger('durationchange');
this.onReady();
break;

case 'ended':
Expand Down
1 change: 0 additions & 1 deletion es5/tech/Soundcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ var Soundcloud = (function (_Externals) {
value: function initTech() {
this.widgetPlayer = SC.Widget(this.options_.techId);
_get(Object.getPrototypeOf(Soundcloud.prototype), 'initTech', this).call(this);
this.onStateChange({ type: -1 });
}
}, {
key: 'setupTriggers',
Expand Down
9 changes: 8 additions & 1 deletion es5/tech/Spotify.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ var Spotify = (function (_Externals) {
_createClass(Spotify, [{
key: 'createEl',
value: function createEl() {
var _this = this;

var source = null;
if ('string' === typeof this.options_.source) {
source = this.options_.source;
Expand All @@ -60,6 +62,9 @@ var Spotify = (function (_Externals) {
var el_ = _get(Object.getPrototypeOf(Spotify.prototype), 'createEl', this).call(this, 'iframe', {
width: '100%',
height: '100%',
onload: function onload() {
return _this.onStateChange({ type: 'apiready' });
},
src: 'https://embed.spotify.com/?uri=' + source
}, false);

Expand Down Expand Up @@ -122,7 +127,9 @@ var Spotify = (function (_Externals) {
}, {
key: 'src',
value: function src(_src) {
this.el_.src(_src);
if (typeof _src !== 'undefined') {
this.el_.src(_src);
}
}
}]);

Expand Down
2 changes: 0 additions & 2 deletions es5/tech/Youtube.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var Youtube = (function (_Externals) {
case -1:
this.trigger('loadstart');
this.trigger('loadedmetadata');
this.trigger('durationchange');
break;

case YT.PlayerState.PLAYING:
Expand Down Expand Up @@ -185,7 +184,6 @@ var Youtube = (function (_Externals) {
onError: this.onPlayerError.bind(this)
}
});

_get(Object.getPrototypeOf(Youtube.prototype), 'initTech', this).call(this);
}
}, {
Expand Down

0 comments on commit 8fc5c45

Please sign in to comment.