Title: [241078] branches/safari-607-branch/Source/WebCore
Revision
241078
Author
alanc...@apple.com
Date
2019-02-06 14:17:21 -0800 (Wed, 06 Feb 2019)

Log Message

Cherry-pick r240833. rdar://problem/47774523

    [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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240833 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (241077 => 241078)


--- branches/safari-607-branch/Source/WebCore/ChangeLog	2019-02-06 22:17:19 UTC (rev 241077)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog	2019-02-06 22:17:21 UTC (rev 241078)
@@ -1,5 +1,36 @@
 2019-02-05  Alan Coon  <alanc...@apple.com>
 
+        Cherry-pick r240833. rdar://problem/47774523
+
+    [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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-02-05  Alan Coon  <alanc...@apple.com>
+
         Cherry-pick r240822. rdar://problem/47774539
 
     [Mac] Requesting PiP from two different WebViews gets PiP window "stuck"

Modified: branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (241077 => 241078)


--- branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-06 22:17:19 UTC (rev 241077)
+++ branches/safari-607-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-02-06 22:17:21 UTC (rev 241078)
@@ -1799,10 +1799,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());
@@ -1809,6 +1812,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