brightcove / player-loader

An asynchronous script loader and embed generator for the Brightcove Player.
Other
28 stars 15 forks source link

data-bc-trackingid parameter #63

Closed csBrightcove closed 4 years ago

csBrightcove commented 4 years ago

Does the player-loader support the "data-bc-trackingid" parameter? If so, how do we pass it in? Here is the embedded version for reference:

<video
         data-video-id="6033402539001" 
         data-account="1486906377" 
         data-bc-trackingid="12345">
</video>
 <script src="//players.brightcove.net/1486906377/default_default/index.min.js"></script>

Background: https://audience.support.brightcove.com/integrations/hubspot/integrating-video-cloud-hubspot-using-client-side-apis.html

Many thanks, Jimmy

misteroneill commented 4 years ago

Setting arbitrary attributes is not currently support, but you customize anything about the generated embed code via the onEmbedCreated callback. Something like:

onEmbedCreated(elem) {
  elem.setAttribute('data-bc-trackingid', '12345');
}