fixed CompoPlayer controls init bug
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user