Merge pull request #1516 from azizhk/toggle_return_promsie
Toggle also returns promise
This commit is contained in:
commit
5dd9462bed
@ -371,7 +371,7 @@ class Plyr {
|
||||
return;
|
||||
}
|
||||
|
||||
this.media.pause();
|
||||
return this.media.pause();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -411,9 +411,9 @@ class Plyr {
|
||||
const toggle = is.boolean(input) ? input : !this.playing;
|
||||
|
||||
if (toggle) {
|
||||
this.play();
|
||||
return this.play();
|
||||
} else {
|
||||
this.pause();
|
||||
return this.pause();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user