Brightcove Player v6.36.5

The Brightcove Player v6.36.5 is available. Notable changes since v6.35.2 include:

Features

Bug Fixes

Chores

Additional Notes

Astute users may notice that the most recent pre-release was 6.36.4 - in other words, we skipped the pre-release phase for 6.36.5. The difference between these versions was an update from Video.js 7.6.4 to 7.6.5. The reason for this change is that, with Video.js 7.6.4, we noticed that the default ID for the first player created changed from vjs_video_3 to vjs_video_2 due to internal refactoring and code improvements.

We didn't want to break any customer integrations that might be relying on vjs_video_3 (which our support staff have informed us is a known use-case).

This is a great opportunity to educate our users that the vjs_video_3 ID should not be relied upon because it is automatically generated using an internal, auto-incrementing variable. There are better ways to get a reference to your player!

Our current general recommendation for getting player references is to use the videojs.getPlayer() method. This method takes an ID string or a DOM element (e.g., a <video-js> element). The videojs.players object can only be used to get player references by their ID (generated or not). When not assigning an ID to your player, the recommendation is to pass an embed element reference to the videojs.getPlayer() method:

<video-js ...></video-js>
<script src="//players.brightcove.net/.../index.min.js"></script>
<script>
  (function(){


    // Use any method you want to get a DOM node reference.
    var embed = document.querySelector('video-js');


    // Retrieve the already-created player using a DOM node reference instead of an ID.
    var player = videojs.getPlayer(embed);


    // Just in case something went wrong creating the player in the Brightcove script above!
    if (!player) {
      return;
    }


    // Do things with the `player` object here...
  })();
</script>