Ugoira play/pause button hide fix
Arrow functions don't allow the use of "this" (ends up returning the window object) so the buttons are failing to hide themselves.
This commit is contained in:
@@ -30,7 +30,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => {
|
||||
|
||||
$("#ugoira-play").click(e => {
|
||||
Ugoira.player.play();
|
||||
$(this).hide();
|
||||
$("#ugoira-play").hide();
|
||||
$("#ugoira-pause").show();
|
||||
Ugoira.player_manually_paused = false;
|
||||
e.preventDefault();
|
||||
@@ -38,7 +38,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => {
|
||||
|
||||
$("#ugoira-pause").click(e => {
|
||||
Ugoira.player.pause();
|
||||
$(this).hide();
|
||||
$("#ugoira-pause").hide();
|
||||
$("#ugoira-play").show();
|
||||
Ugoira.player_manually_paused = true;
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user