Attempt to fix YouTube message error, added ads references, changes to bool

This commit is contained in:
Sam Potts
2018-01-25 22:41:30 +11:00
parent b4e22e2e7b
commit 5e68f8c8dd
16 changed files with 73 additions and 26 deletions

View File

@ -309,11 +309,14 @@ class Plyr {
* Play the media, or play the advertisement
*/
play() {
// Play the ad if setup
// TODO: Fix the occasional play of the video before the Ad fires?
if (this.ads.enabled && !this.ads.initialized) {
this.ads.play();
}
this.media.play();
// Return the promise (for HTML5)
return this.media.play();
}
/**