videojs / videojs-contrib-ads

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

fix: updateUsPrivacyString() callback not invoked when USP API not in use in any window #553

Closed alex-barstow closed 1 year ago

alex-barstow commented 1 year ago

Description

player.ads.updateUsPrivacyString(callback) would not invoke the callback if the USP API was not present in the current window or any parent window. Now it is synchronously invoked with a null privacyString, so updateUsPrivacyString() can be used safely when the presence of the USP API is uncertain.