Skip to content

Commit

Permalink
VAST-51 add try catch (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasty authored Jul 19, 2023
1 parent 94e4e1c commit a0b4cf9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ class Vast extends Plugin {

// initialize videojs-contrib-ads
if (!this.player.ads) return;
this.player.ads(videojsContribAdsOptions);
try {
this.player.ads(videojsContribAdsOptions);
} catch (e) {
console.error(e);
}

if (options.vmapUrl) {
this.handleVMAP(options.vmapUrl);
Expand Down

0 comments on commit a0b4cf9

Please sign in to comment.