aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plugins/ads.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plugins/ads.js')
-rw-r--r--src/js/plugins/ads.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/js/plugins/ads.js b/src/js/plugins/ads.js
index 48682dcf..9f1088fa 100644
--- a/src/js/plugins/ads.js
+++ b/src/js/plugins/ads.js
@@ -370,14 +370,12 @@ class Ads {
// TODO: So there is still this thing where a video should only be allowed to start
// playing when the IMA SDK is ready or has failed
- if (player.ended){
- this.loadAds();
- }
- else
- {
+ if (this.player.ended) {
+ this.loadAds();
+ } else {
// The SDK won't allow new ads to be called without receiving a contentComplete()
- this.loader.contentComplete();
- }
+ this.loader.contentComplete();
+ }
break;