videojs / videojs-contrib-ads

A Tool for Building Video.js Ad Plugins
http://videojs.github.io/videojs-contrib-ads/
Other
379 stars 257 forks source link

feat: ads error interface #568

Closed wseymour15 closed 6 months ago

wseymour15 commented 6 months ago

The implementation for an error interface specifically for ads. An error can be set on the player.ads.error() function by passing it an object containing a type string and a metadata object containing any custom data that is desired. The bulk of the work is in ads.js

There are examples of usage in this repo, but this can also be used when contrib ads is pulled into a user's repo. Errors can be handled or set by the user.

Proposed Changes: