Merge pull request #1516 from azizhk/toggle_return_promsie

Toggle also returns promise
This commit is contained in:
Sam Potts 2020-01-13 16:25:17 +00:00 committed by GitHub
commit 5dd9462bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}
}