Upgrade Bitmovin Player v6 to v7

Bitmovin Player v7 provides many new features and capabilities. As with most new major versions, there are a few changes in the existing configuration, API and events.

Skinning

The most prominent change might be the new player UI, which is also available as open source project on GitHub. Instead of the old, JSON-based skinning the player is now fully customizable using CSS. The relevant documentation can be found in the CSS skinning reference. There is also a migration guide for existing JSON skins available. As a consequence of these changes, the skin configuration parameter as well as the setSkin API call were removed in v7.

Removed:

  • configuration.skin
  • playerInstance.setSkin(json)

Including the file and setup

The file to be included on the HTML page was renamed from bitmovinplayer.min.js to bitmovinplayer.js. The overall player size was reduced and there is now one JavaScript file less to load, which improves the startup performance even further.
Furthermore, the global window.bitmovin.player object is not created anymore if the player is used in a module loader environment, such as requireJS. As this would prevent the usage constants, such as the event names (e.g. bitmovin.player.EVENT.ON_READY), the constants were added to player instances as well:

var player = bitmovin.player('id');
player.setup(...).then(function() {
  player.addEventHandler(player.EVENT.ON_SEEK, function() { ... });
});

Added:

  • playerInstance.EVENT
  • playerInstance.EVENTS
  • playerInstance.LOG_LEVEL
  • playerInstance.LOG_LEVELS
  • playerInstance.VR

Renamed:

  • File name from bitmovinplayer.min.js to bitmovinplayer.js

Removed:

  • window.bitmovin.player, if used in a module loader environment

Events

Some player events were confusing and misleading, especially for new users. Therefore, we renamed some of the events for the sake of clarity. The player event documentation contains references to the previous event names.

Name in v6Name in v7
ON_START_BUFFERINGON_STALL_STARTED
ON_STOP_BUFFERINGON_STALL_ENDED
ON_UNMUTEON_UNMUTED
ON_MUTEON_MUTED
ON_VIDEO_PLAYBACK_QUALITY_CHANGEON_VIDEO_PLAYBACK_QUALITY_CHANGED
ON_AUDIO_PLAYBACK_QUALITY_CHANGEON_AUDIO_PLAYBACK_QUALITY_CHANGED
ON_VOLUME_CHANGEON_VOLUME_CHANGED
ON_AUDIO_CHANGEON_AUDIO_CHANGED
ON_CAST_PAUSEON_CAST_PAUSED
ON_CAST_STOPON_CAST_STOPPED
ON_CAST_TIME_UPDATEON_CAST_TIME_UPDATED
ON_CAST_LAUNCHEDON_CAST_STARTED
ON_PAUSEON_PAUSED
ON_SUBTITLE_CHANGEON_SUBTITLE_CHANGED
<no equivalent>ON_VIDEO_DOWNLOAD_QUALITY_CHANGE
ON_VIDEO_DOWNLOAD_QUALITY_CHANGEON_VIDEO_DOWNLOAD_QUALITY_CHANGED
<no equivalent>ON_AUDIO_DOWNLOAD_QUALITY_CHANGE
ON_AUDIO_DOWNLOAD_QUALITY_CHANGEON_AUDIO_DOWNLOAD_QUALITY_CHANGED

Sideloaded subtitle files

The addSubtitle API call can be used to add external subtitle files. This was already available in previous player versions and still continues to be working in v7. However, the parameters changed from up to five separate values to a single subtitle object. It follows the same structure as returned by getSubtitle() and the array entries of getAvailableSubtitles().

Pre v7:

addSubtitle('http://my.domain/subtitle.file', 'myid', 'subtitle', 'en', 'optional-label');

Using v7:

addSubtitle({
  url: 'http://my.domain/subtitle.file',
  id: 'myId',
  kind: 'subtitle',
  lang: 'en',
  label: 'optional-label'
});

Changed parameters:

  • addSubtitle(subtitleObject) instead of addSubtitle(url, trackID, kind, language, [label])

Version

In previous player versions, it was necessary to create a player object just to check the version of the used Bitmovin player (using getVersion()). With v7, the version information is available before any other interaction with the player, by accessing the property bitmovin.player.version. For the sake of consistency and completeness, the same property is available on player instances as well and can be used before the setup(...) API call:

var playerInstance = bitmovin.player('id');
console.log(playerInstance.version);

The getVersion() API call has been removed in favor of the static version property.

Added:

  • bitmovin.player.version
  • playerInstance.version

Removed:

  • playerInstance.getVersion()

Style configuration

As the new player UI provides much more possibilities to customize simply via CSS, several configuration options in the style config has been removed.

Removed:

  • autoHideControls
  • controls
  • bufferingOverlay
  • playOverlay
  • keyboard
  • mouse
  • subtitlesHidden
  • showErrors
Back to Top
Simple Share Buttons