BLOG / FEATURES & UPDATES

Overview of Updates for Brightcove Player Version 6

Features & Updates

Brightcove Player 6 is now available for testing. This article describes some of the benefits of this new version and how you can try it. Brightcove Player 6 is a major step forward to make player development and customization easier. Brightcove Player 6 includes:

  • Advanced Plugins
    • an improved plugin API making plugins easier to write and maintain
  • Dynamic Sources - allows changing video types after player initialization - so you can mix content types across playlists, ads, and better support conditional loading and dynamic page behavior
  • Accessibility Update
    • improvements to outline styles and removed nested buttons
  • Easier UI customization
    • simpler CSS model and better tooltips

Why a major version?

While we made significant effort to minimize potentially breaking changes, and to retain compatibility with existing plugins and customizations, we incremented the major version number because a few of the changes we made to simplify the API could break some integration code. The major version number indicates this potential and signifies the need to review customizations and integrations to make sure they still work.

How do I try it?

During Q2 2017 Brightcove Player 6 is currently available as a pre-release. If you want to try it out, you can do so using our API instructions.

Over the next couple of months, we expect to make version 6 the default version for new players. Users of previous versions of Brightcove Player will have the option to upgrade when they are ready. Version 5 will continue to be available via the Studio menu for 6 months.

Feature Details

Dynamic Sources

Designed after the popular middleware offerings in web frameworks like Express and Django, Brightcove Player dynamic sources is a simple, but powerful, feature that allows fine-tuned control over the source selection process and the player timeline. Read a more detailed description here.

Advanced Plugins

Brightcove Player 6 now supports both existing plugins and so-called “advanced” plugins. These offer a number of benefits to plugin authors including lifecycle management (setup/dispose), which helps avoid memory leaks. With this change comes new player methods for detecting which plugins are available and which are currently in use on a player. Get more details on advanced plugins here.

Accessibility

We strive to make our player accessible to users with disabilities. Based on feedback from Brightcove Player 5 users, we made it easier to use our player with an accessible web site.

  • The outline styles had been removed from elements making it difficult or impossible to tell which element was focused in the player.
  • There were cases where we had HTML buttons within HTML buttons. This confused screen readers and made it difficult to use the volume controls.

UI Improvements

Based on feedback we made some changes to make it easier to use and customize the player. Specifically, we have combined the captions and subtitles controls into one menu. Also time tooltips in the progress bar are now always contained within the bounds of the player.

Migration Guide

Plugins for version 5 should continue to work with version 6. While most plugins should be compatible, it is important to be aware of the changes and evaluate each plugin since there are some backwards-incompatible changes. The following section explains these changes and how they may affect our customers’ and partners’ code.

Method Chaining Removed

One of the relatively unknown features of Brightcove Player 5 is that many player methods could be chained off of each other, jQuery-style. The problem with this was it made the return values of some functions unpredictable, leading to code that could be hard to debug. Sometimes they would return a value, sometimes the player itself. In version 6 we have removed method chaining support. Where methods previously returned a player, they now return nothing.

The src() Function

In Brightcove Player 5 the src() function returns the source URL being played back in the video element. This can cause problems with certain formats like HLS where it could return a “blob” URL. This is virtually useless to users, who usually wanted to know the source that had been originally set on the player. In version 6, the src() function now returns the source path determined by the new dynamic source selection procedure instead.

Asynchronous Source Setting

In Brightcove Player 5, calling src() and passing in a value would kick off a synchronous source selection algorithm. This meant that any subsequent calls to src() would return the source that was selected by the last call:

player.src({type: ‘video/mp4’, src: ‘foo.mp4’});
videojs.log(player.src().src); // ‘foo.mp4’

However, because the new source selection mechanism has asynchrony baked in - supporting advanced workflows like making server calls for custom source selection - the player can no longer guarantee the above to be the case.

UI and Accessibility Changes

The UI and accessibility changes that were made in Brightcove Player 6 mean that the HTML and CSS may have changed along with them. Components that have changed markup include:

  • Volume controls
  • Combined captions and subtitles menu
  • Progress bar time tooltips

Custom skins with a lot of customization may have to adjust for these changes. More information about accessibility changes in this release can be found here.

Deprecations

Several methods from Brightcove Player 5 were deprecated. They will log warnings in the browser console with a suggestion as to how to avoid them, if desired. Some of the key method changes are:

  • videojs.plugin() is deprecated, use videojs.registerPlugin() instead.
  • DOM manipulation methods - such as addClass(), hasClass(), createEl(), etc. are being moved to a sub-object: videojs.dom. Each will log an appropriate warning, but continue functioning for the lifetime of Brightcove Player 6.

Get Started!

Try the pre-release version of Brightcove 6.0 Player today and let us know what you think. To get started, request access to the Brightcove Player Developer Group and follow the links and instructions for version 6. You can also post your feedback there. Thanks!