fixed CompoPlayer controls init bug

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-27 15:52:50 +02:00
parent 58ffc1ff88
commit bb03f9bf7b
2 changed files with 24 additions and 22 deletions
@@ -663,17 +663,18 @@
this.$composer = $('.composition_ui .composer');
this.$compo = $('.composition_ui .composer .composition');
this.$controls = $('.composition_ui .composer .compo-player-controls');
this.$previous = $('<div>').addClass('previous')
.on('click', this.prev.bind(this))
.appendTo(this.$controls);
this.$playpause = $('<div>').addClass('play-pause')
.on('click', this.togglePlayPause.bind(this))
.appendTo(this.$controls);
this.$next = $('<div>').addClass('next')
.on('click', this.next.bind(this))
.appendTo(this.$controls);
// this.$playpause = $('.compo-player-controls', this.$composer)
// .on('click', this.togglePlayPause.bind(this));
if(!this.$controls.is('.ready')){
this.$previous = $('<div>').addClass('previous')
.on('click', this.prev.bind(this))
.appendTo(this.$controls);
this.$playpause = $('<div>').addClass('play-pause')
.on('click', this.togglePlayPause.bind(this))
.appendTo(this.$controls);
this.$next = $('<div>').addClass('next')
.on('click', this.next.bind(this))
.appendTo(this.$controls);
this.$controls.addClass('ready');
}
this.refresh();
},
refresh(){
@@ -663,17 +663,18 @@
this.$composer = $('.composition_ui .composer');
this.$compo = $('.composition_ui .composer .composition');
this.$controls = $('.composition_ui .composer .compo-player-controls');
this.$previous = $('<div>').addClass('previous')
.on('click', this.prev.bind(this))
.appendTo(this.$controls);
this.$playpause = $('<div>').addClass('play-pause')
.on('click', this.togglePlayPause.bind(this))
.appendTo(this.$controls);
this.$next = $('<div>').addClass('next')
.on('click', this.next.bind(this))
.appendTo(this.$controls);
// this.$playpause = $('.compo-player-controls', this.$composer)
// .on('click', this.togglePlayPause.bind(this));
if(!this.$controls.is('.ready')){
this.$previous = $('<div>').addClass('previous')
.on('click', this.prev.bind(this))
.appendTo(this.$controls);
this.$playpause = $('<div>').addClass('play-pause')
.on('click', this.togglePlayPause.bind(this))
.appendTo(this.$controls);
this.$next = $('<div>').addClass('next')
.on('click', this.next.bind(this))
.appendTo(this.$controls);
this.$controls.addClass('ready');
}
this.refresh();
},
refresh(){