shaka-project / shaka-player

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

IE 11 DRM support query reports only limited set of codecs #393

Closed Ross-cz closed 8 years ago

Ross-cz commented 8 years ago

Using Win 10 & Intel HD 5500 GPU latest drivers I get limited list of the supported codecs.

Test case:

  1. use IE11 url https://shaka-player-demo.appspot.com/demo/
  2. select asset "Tears of Steel (PlayReady)"
  3. two issues: a) find Info section and expand Video tracks - only 124 & 208 qualities appears b) 1080p is active stream and shows error on the demo site (inc. edge): Shaka Error DRM.LICENSE_REQUEST_FAILED (shaka.util.Error { "category": 1, "code": 1002, "data": [ "https://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1" ], "message": "Shaka Error NETWORK.HTTP_ERROR (https://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1)", "stack": "Error: Shaka Error NETWORK.HTTP_ERROR (https://playready.directtaps.net/pr/svc/rightsmanager.asmx?PlayRight=1&UseSimpleNonPersistentLicense=1)\n at shaka.util.Error (https://shaka-player-demo.appspot.com/lib/util/error.js:77:7)\n at xhr.onerror (https://shaka-player-demo.appspot.com/lib/net/http_plugin.js:77:7)" })

Video streams were filtered by method shaka.util.StreamUtils.filterPeriod because of logic inside shaka.media.DrmEngine.prototype.queryMediaKeys . To prevent filtering I used easy workaround - already included Edge browser hack (this.supportedTypes = null;).

Here is support info. Created using: shaka.Player.support().then(function (a) {console.log(JSON.stringify(a))}) IE 11 (11.306.10586.0): {"manifest":{"basic":true,"application/dash+xml":true,"mpd":true,"application/x-mpegurl":false,"application/vnd.apple.mpegurl":false,"application/vnd.ms-sstr+xml":false,"m3u8":false,"ism":false},"media":{"basic":true,"video/mp4; codecs=\"avc1.42E01E\"":true,"video/mp4":true,"audio/mp4; codecs=\"mp4a.40.2\"":true,"audio/mp4":true,"video/webm; codecs=\"vp8\"":false,"video/webm":false,"video/webm; codecs=\"vp9\"":false,"audio/webm; codecs=\"vorbis\"":false,"audio/webm":false,"audio/webm; codecs=\"opus\"":false,"video/mp2t; codecs=\"avc1.42E01E\"":false,"video/mp2t":false,"video/mp2t; codecs=\"mp4a.40.2\"":false,"text/vtt":true,"application/mp4; codecs=\"wvtt\"":false,"application/mp4":false,"application/ttml+xml":false,"application/mp4; codecs=\"stpp\"":false},"drm":{"basic":true,"org.w3.clearkey":false,"com.widevine.alpha":false,"com.microsoft.playready":true,"com.apple.fps.2_0":false,"com.apple.fps.1_0":false,"com.apple.fps":false,"com.adobe.primetime":false},"supported":true}

Chrome 50.0.2661.102 m (production): {"manifest":{"basic":true,"application/dash+xml":true,"mpd":true,"application/x-mpegurl":false,"application/vnd.apple.mpegurl":false,"application/vnd.ms-sstr+xml":false,"m3u8":false,"ism":false},"media":{"basic":true,"video/mp4; codecs=\"avc1.42E01E\"":true,"video/mp4":true,"audio/mp4; codecs=\"mp4a.40.2\"":true,"audio/mp4":true,"video/webm; codecs=\"vp8\"":true,"video/webm":true,"video/webm; codecs=\"vp9\"":true,"audio/webm; codecs=\"vorbis\"":true,"audio/webm":true,"audio/webm; codecs=\"opus\"":true,"video/mp2t; codecs=\"avc1.42E01E\"":false,"video/mp2t":false,"video/mp2t; codecs=\"mp4a.40.2\"":false,"text/vtt":true,"application/mp4; codecs=\"wvtt\"":false,"application/mp4":false,"application/ttml+xml":false,"application/mp4; codecs=\"stpp\"":false},"drm":{"basic":true,"org.w3.clearkey":true,"com.widevine.alpha":true,"com.microsoft.playready":false,"com.apple.fps.2_0":false,"com.apple.fps.1_0":false,"com.apple.fps":false,"com.adobe.primetime":false},"supported":true}

Edge (25.10586.0 / 13.10586): {"manifest":{"basic":true,"application/dash+xml":true,"mpd":true,"application/x-mpegurl":false,"application/vnd.apple.mpegurl":false,"application/vnd.ms-sstr+xml":false,"m3u8":false,"ism":false},"media":{"basic":true,"video/mp4; codecs=\"avc1.42E01E\"":true,"video/mp4":true,"audio/mp4; codecs=\"mp4a.40.2\"":true,"audio/mp4":true,"video/webm; codecs=\"vp8\"":false,"video/webm":false,"video/webm; codecs=\"vp9\"":false,"audio/webm; codecs=\"vorbis\"":false,"audio/webm":false,"audio/webm; codecs=\"opus\"":false,"video/mp2t; codecs=\"avc1.42E01E\"":true,"video/mp2t":true,"video/mp2t; codecs=\"mp4a.40.2\"":true,"text/vtt":true,"application/mp4; codecs=\"wvtt\"":false,"application/mp4":false,"application/ttml+xml":false,"application/mp4; codecs=\"stpp\"":false},"drm":{"basic":true,"org.w3.clearkey":false,"com.widevine.alpha":false,"com.microsoft.playready":true,"com.apple.fps.2_0":false,"com.apple.fps.1_0":false,"com.apple.fps":false,"com.adobe.primetime":false},"supported":true}

joeyparrish commented 8 years ago

This looks similar to a DRM filtering bug we fixed incidentally in a644900. Can you try again with the latest from master and let us know if that fixed your issue as well?

Ross-cz commented 8 years ago

Issue still persists.

There is incompatibility for MSIE 11 inside this part of code:

        // Edge 13 fails this negotiation with NotSupportedError if more than
          // one entry is given, even if each entry individually would be
          // supported.  Bug filed: https://goo.gl/vr2Vle
          if (drmInfo.keySystem == 'com.microsoft.playready' &&
              **capabilities.length**) {
            return;
          }
          capabilities.push({
            robustness: robustness,
            contentType: fullMimeType
          });

Code comment is incorrect for the condition and this causes only one video codec selection inside patchedmediakeys_20140218 polyfill.

joeyparrish commented 8 years ago

Ah, I see. Because the polyfill actually supports and can query multiple capabilities, it returns the filtered list of types. So only sending one to the polyfill causes the manifest to inappropriately filtered.

I expect the Edge bug to be fixed in the near future, and we should be able to restrict the workaround to just Edge until then. Thanks for the report!

joeyparrish commented 8 years ago

I tested the fix on IE11 and Edge. @Ross-cz, would you please retest with the latest from master and confirm the fix for us?