shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.06k stars 1.33k forks source link

Playready on Edge failure #3917

Closed paolapereira93 closed 1 year ago

paolapereira93 commented 2 years ago

Have you read the FAQ and checked for duplicate open issues? yes

What link can we use to reproduce this? https://shaka-player-demo.appspot.com/demo/#audiolang=pt-BR;textlang=pt-BR;uilang=pt-BR;asset=https://test.playready.microsoft.com/media/dash/APPLEENC_CBCS_BBB_1080p/1080p_alternate.m3u8;panel=ALL_CONTENT;panelData=drm:PLAYREADY;build=uncompiled

What version of Shaka Player are you using? v3.3.1-uncompiled

What browser and OS are you using? Edg/97.0.1072.69 Windows 10 Pro

What did you do? I played a playready-only video on shaka player demo and received an 6001 error (Shaka Error DRM.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE ()).

What did you expect to happen? I expected the video to play correctly since in other players it was possible to play videos with playready only.

What actually happened? The browser and OS supports playready drm, but shaka apparently not.

image

joeyparrish commented 2 years ago

It's possible that the request key system config is truly unavailable. It could be the wrong configuration, or it could be that something is wrong or missing on your system.

Can you please copy and paste the results of this page for us? https://shaka-player-demo.appspot.com/support.html Thanks!

paolapereira93 commented 2 years ago

Yes, sure!

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69
v3.3.1

{
  "manifest": {
    "application/dash+xml": true,
    "video/vnd.mpeg.dash.mpd": true,
    "application/x-mpegurl": true,
    "application/vnd.apple.mpegurl": true,
    "application/x-offline-manifest": true,
    "mpd": true,
    "m3u8": true,
    "application/vnd.ms-sstr+xml": false,
    "ism": false
  },
  "media": {
    "video/mp4; codecs=\"avc1.42E01E\"": true,
    "video/mp4": true,
    "video/mp4; codecs=\"avc3.42E01E\"": true,
    "video/mp4; codecs=\"hev1.1.6.L93.90\"": false,
    "video/mp4; codecs=\"hvc1.1.6.L93.90\"": false,
    "video/mp4; codecs=\"hev1.2.4.L153.B0\"; eotf=\"smpte2084\"": false,
    "video/mp4; codecs=\"hvc1.2.4.L153.B0\"; eotf=\"smpte2084\"": false,
    "video/mp4; codecs=\"vp9\"": false,
    "video/mp4; codecs=\"vp09.00.10.08\"": true,
    "video/mp4; codecs=\"av01.0.01M.08\"": false,
    "audio/mp4; codecs=\"mp4a.40.2\"": true,
    "audio/mp4": true,
    "audio/mp4; codecs=\"ac-3\"": true,
    "audio/mp4; codecs=\"ec-3\"": true,
    "audio/mp4; codecs=\"opus\"": true,
    "audio/mp4; codecs=\"flac\"": true,
    "video/webm; codecs=\"vp8\"": true,
    "video/webm": true,
    "video/webm; codecs=\"vp9\"": true,
    "video/webm; codecs=\"vp09.00.10.08\"": true,
    "audio/webm; codecs=\"vorbis\"": true,
    "audio/webm": true,
    "audio/webm; codecs=\"opus\"": true,
    "video/mp2t; codecs=\"avc1.42E01E\"": true,
    "video/mp2t": true,
    "video/mp2t; codecs=\"avc3.42E01E\"": true,
    "video/mp2t; codecs=\"hvc1.1.6.L93.90\"": false,
    "video/mp2t; codecs=\"mp4a.40.2\"": true,
    "video/mp2t; codecs=\"ac-3\"": false,
    "video/mp2t; codecs=\"ec-3\"": false,
    "text/vtt": true,
    "application/mp4; codecs=\"wvtt\"": true,
    "application/mp4": true,
    "application/ttml+xml": true,
    "application/mp4; codecs=\"stpp\"": true
  },
  "drm": {
    "org.w3.clearkey": {
      "persistentState": false
    },
    "com.widevine.alpha": {
      "persistentState": true
    },
    "com.microsoft.playready": {
      "persistentState": true
    },
    "com.microsoft.playready.recommendation": {
      "persistentState": true
    },
    "com.apple.fps.3_0": null,
    "com.apple.fps.2_0": null,
    "com.apple.fps.1_0": null,
    "com.apple.fps": null,
    "com.adobe.primetime": null
  },
  "offline": true
}
avelad commented 2 years ago

@paolapereira93 Can you check with 4.0.0 if you reproduce the problem?

joeyparrish commented 2 years ago

@paolapereira93, as you can see from the support.html output, com.microsoft.playready support is detected. Shaka Player does support PlayReady, and you can try other PlayReady content in our demo to confirm that.

However, some aspect of this content causes the check to fail. Things like container, codec, etc are passed to the EME API to check if it can be decrypted and played. I would suggest that either:

Thank you for giving us such a simple repro case, though. Any volunteers to debug this through DrmEngine, MediaCapabilities, etc?

https://shaka-player-demo.appspot.com/demo/#audiolang=pt-BR;textlang=pt-BR;uilang=pt-BR;asset=https://test.playready.microsoft.com/media/dash/APPLEENC_CBCS_BBB_1080p/1080p_alternate.m3u8;panel=ALL_CONTENT;panelData=drm:PLAYREADY;build=uncompiled

BucherTomas commented 2 years ago

The m3u8 playlist does not provide value in CODECS tag for audio

#EXT-X-STREAM-INF:AVERAGE-BANDWIDTH=4333805,BANDWIDTH=10968495,CODECS="avc1.64002a",RESOLUTION=1920x1080,FRAME-RATE=60.000,CLOSED-CAPTIONS=NONE,AUDIO="ac-3"
video/prog_index.m3u8

requestMediaKeySystemAccess() then fails with

MediaCapabilities.decodingInfo() failed. {"type":"media-source","video":{"contentType":"video/mp4; codecs=\"avc1.64002a\"","width":1920,"height":1080,"bitrate":4333805,"framerate":60},"audio":{"contentType":"audio/mp4; codecs=\"avc1.64002a\"","channels":2,"bitrate":4333805,"samplerate":1,"spatialRendering":false},"keySystemConfiguration":{"keySystem":"com.microsoft.playready","initDataType":"cenc","persistentState":"optional","distinctiveIdentifier":"optional","sessionTypes":["temporary"],"audio":{"robustness":""},"video":{"robustness":""}}} DOMException: Unsupported keySystem or supportedConfigurations.

as video codec is used for audio as well.

joeyparrish commented 2 years ago

Ah, that makes sense. With only one codecs value for a variant with audio, the HLS parser gets confused. It could probably be fixed to default to mp4a.40.2 in situations like this.