kaltura-player-js

Media Capabilities API

It is possible to get the media capabilities and to decide which action to take accordingly.

This API will give you the following information:

It is optional to pass an object parameter to the API, which will contain the HEVC configuration to test. See below a list of the optional properties:

The Media Capabilities API is returning the following object structure:

Note - the optional numbers for the flags are:

Example - how to use Media Capabilities API and its response

// after calling KalturaPlayer.setup().....
kalturaPlayer.getMediaCapabilities({width: 1280, height: 720}).then(mediaCapabilities => {
  // print the media capabilities result to the console
  console.log('media capabilities result --> ', {mediaCapabilities});
  // load drm media or clear media, based on the API response
  kalturaPlayer.loadMedia({entryId: mediaCapabilities.isDRMSupported === 1 ? DRM_ENTRY_ID : CLEAR_ENTRY_ID});
});

Note: the API should be invoked after calling KalturaPlayer.setup() API

You want to pass HEVC configuration to the API, but you don’t know which values to choose

See below a list of online resources to help you choose the values you need: