Title: [240833] trunk/Source/WebCore
Revision
240833
Author
jer.no...@apple.com
Date
2019-01-31 18:32:33 -0800 (Thu, 31 Jan 2019)

Log Message

[Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
https://bugs.webkit.org/show_bug.cgi?id=194114

Reviewed by Eric Carlson.

The AVAssetResourceLoaderDelegate must explicitly... delegate responsibility for FairPlay key
requests to the AVContentKeySession.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240832 => 240833)


--- trunk/Source/WebCore/ChangeLog	2019-02-01 01:37:36 UTC (rev 240832)
+++ trunk/Source/WebCore/ChangeLog	2019-02-01 02:32:33 UTC (rev 240833)
@@ -1,3 +1,16 @@
+2019-01-31  Jer Noble  <jer.no...@apple.com>
+
+        [Cocoa][EME] AirPlaying a FairPlay-protected HLS stream fails to decrypt
+        https://bugs.webkit.org/show_bug.cgi?id=194114
+
+        Reviewed by Eric Carlson.
+
+        The AVAssetResourceLoaderDelegate must explicitly... delegate responsibility for FairPlay key
+        requests to the AVContentKeySession.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
+
 2019-01-31  Megan Gardner  <megan_gard...@apple.com>
 
         Don't insert spaces at the beginning of a newline when using smart-copy-paste

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (240832 => 240833)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-01 01:37:36 UTC (rev 240832)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-01 02:32:33 UTC (rev 240833)
@@ -1802,10 +1802,13 @@
         if (!player()->keyNeeded(initData.ptr()))
             return false;
 #endif
-        m_keyURIToRequestMap.set(keyURI, avRequest);
+
 #if ENABLE(ENCRYPTED_MEDIA) && HAVE(AVCONTENTKEYSESSION)
-        if (m_cdmInstance)
-            return false;
+        if (m_cdmInstance) {
+            avRequest.contentInformationRequest.contentType = AVStreamingKeyDeliveryContentKeyType;
+            [avRequest finishLoading];
+            return true;
+        }
 
         RetainPtr<NSData> keyURIData = [keyURI dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
         m_keyID = SharedBuffer::create(keyURIData.get());
@@ -1812,6 +1815,8 @@
         player()->initializationDataEncountered("skd"_s, m_keyID->tryCreateArrayBuffer());
         setWaitingForKey(true);
 #endif
+        m_keyURIToRequestMap.set(keyURI, avRequest);
+
         return true;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to