aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 3d0f79a7..36b74e76 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -309,18 +309,8 @@ class Plyr {
* Play the media, or play the advertisement
*/
play() {
- if (this.ads.enabled) {
- if (this.ads.playing) {
- return;
- }
-
- if (!this.ads.initialized) {
- this.ads.play();
- }
-
- if (!this.ads.playing) {
- this.media.play();
- }
+ if (this.ads.enabled && !this.ads.initialized) {
+ this.ads.play();
}
this.media.play();