Title: [221614] trunk/Source/WebCore
Revision
221614
Author
[email protected]
Date
2017-09-05 04:31:21 -0700 (Tue, 05 Sep 2017)

Log Message

HTMLMediaElement: attach any existing EME CDMInstance in mediaEngineWasUpdated()
https://bugs.webkit.org/show_bug.cgi?id=176354

Reviewed by Xabier Rodriguez-Calvar.

It's common for MediaKeys to be set on an HTMLMediaElement object before
any resource is loaded for that element, meaning no underlying MediaPlayer
exists at that point. In order to not stall the pipeline when encrypted
content is finally loaded, the CDMInstance object of the current MediaKeys
set on this element should be attached in mediaEngineWasUpdated() that's
called whenever the underlying MediaPlayerPrivate object is replaced.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaEngineWasUpdated):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (221613 => 221614)


--- trunk/Source/WebCore/ChangeLog	2017-09-05 11:29:03 UTC (rev 221613)
+++ trunk/Source/WebCore/ChangeLog	2017-09-05 11:31:21 UTC (rev 221614)
@@ -1,5 +1,22 @@
 2017-09-05  Zan Dobersek  <[email protected]>
 
+        HTMLMediaElement: attach any existing EME CDMInstance in mediaEngineWasUpdated()
+        https://bugs.webkit.org/show_bug.cgi?id=176354
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        It's common for MediaKeys to be set on an HTMLMediaElement object before
+        any resource is loaded for that element, meaning no underlying MediaPlayer
+        exists at that point. In order to not stall the pipeline when encrypted
+        content is finally loaded, the CDMInstance object of the current MediaKeys
+        set on this element should be attached in mediaEngineWasUpdated() that's
+        called whenever the underlying MediaPlayerPrivate object is replaced.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
+
+2017-09-05  Zan Dobersek  <[email protected]>
+
         [EME] HTMLMediaElement: setMediaKeys() should attach CDMInstance from the arriving MediaKeys
         https://bugs.webkit.org/show_bug.cgi?id=176352
 

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (221613 => 221614)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-09-05 11:29:03 UTC (rev 221613)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-09-05 11:31:21 UTC (rev 221614)
@@ -4881,6 +4881,11 @@
     }
 #endif
 
+#if ENABLE(ENCRYPTED_MEDIA)
+    if (m_player && m_mediaKeys)
+        m_player->cdmInstanceAttached(m_mediaKeys->cdmInstance());
+#endif
+
 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
     if (!m_player)
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to