Skip to content

Bolt v2.3.3 Hotfix Released

Compare
Choose a tag to compare
@sghoweri sghoweri released this 24 May 20:27

Details

This is a hotfix for the older v2.3.x-version of Bolt (originally released in January 2019) which updates the video component's Javascript to prevent an IE 11-specific bug from occasionally occurring that could result in the Brightcove video player initializing multiple times.

Note: these video player updates had already been part of the larger batch of component updates slated for an upcoming Bolt release -- this hotfix simply fast tracks a subset of those changes.

Implementation details

Brightcove changed their best practices for referencing a video player and for delayed player instantiation around v6.12 - v6.18. Our implementation needed to be updated to adhere to the new standards to avoid the confusing initialization issues mentioned in BC's release notes (see 6.18.3).

Since the code change on Brightcove's side, many of our videos worked fine, but we've been plagued by intermittent bugs, especially around plugins. These updates should fix that.

The key changes are:

  • Don't include data-account, data-player, or data-video-id attributes on first render of the <video-js> element or videos will auto-initialize. Add them on rendered() just before calling bc(). (code)
  • Check if video has already initialized before calling bc() to prevent re-initializing the video on re-render when attributes are added. (code)
  • Don't use data-setup. It's a Video.js prop that will confuse Brightcove. Instead pass those configuration options to the Brightcove function itself. (code)
  • Use <video-js> not <video>, new best practice from Brightcove to avoid flash of native video controls. (code)
  • Reference video player with videojs.getPlayer(id) not videojs(id). The latter can cause Video.js to initialize. (code)