Search code examples
codecdrmdash.jsplayready

Play PlayReady 4.0+ Test Content with dash.js


Im trying to test out the sample streams given in PlayReady test content. Im using dash.js as the player and testing in Edge(Dev).

Im getting this error at the playback.

[61][Stream] audioCodec (audio/mp4;codecs="ac-3") is not supported

My code

var player, video;

const config = {
  serverURL: 'http://test.playready.microsoft.com/service/rightsmanager.asmx?cfg=(persist:false,sl:150)'
};
const protData = {
  "com.microsoft.playready": config
};
const url = "https://test.playready.microsoft.com/media/dash/APPLEENC_CBCS_BBB_1080p/1080p.mpd";

video = document.querySelector("video");
player = dashjs.MediaPlayer().create();
player.setProtectionData(protData);
player.initialize(video, url, true);

What have I missed?


Solution

  • dash.js defers all media decoding to the browser. The player tests for AC-3 support in the browser media engine by calling MediaSource.isTypeSupported ('audio/mp4; codecs="ac-3"'). On whatever build of Edge you are using, this is returning false.

    Returns true here on Windows 10, Edge 44.18362.267.0, EdgeHTML 18.18362.