Skip to content

Commit

Permalink
VAST-57: test controlBar existence (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasty authored Oct 10, 2023
1 parent 47c14be commit 7509835
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ class Vast extends Plugin {
);

// make timeline not clickable
this.player.controlBar.progressControl.disable();
if (this.player.controlBar) {
this.player.controlBar.progressControl.disable();
}

if (this.options.addCtaClickZone) {
// add the cta click
Expand Down Expand Up @@ -542,7 +544,9 @@ class Vast extends Plugin {
this.player.trigger('vast.complete');

// reactivate controlbar
this.player.controlBar.progressControl.enable();
if (this.player.controlBar) {
this.player.controlBar.progressControl.enable();
}
}

addEventsListeners() {
Expand Down

0 comments on commit 7509835

Please # to comment.