Title: [248986] branches/safari-608-branch/Source/WebCore
Revision
248986
Author
kocsen_ch...@apple.com
Date
2019-08-21 18:25:41 -0700 (Wed, 21 Aug 2019)

Log Message

Cherry-pick r248952. rdar://problem/54579626

    [iOS] HLS streams disappear from Now Playing when paused on the lock screen
    https://bugs.webkit.org/show_bug.cgi?id=200951
    <rdar://problem/54534301>

    Reviewed by Eric Carlson.

    The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
    changing buffering policy) which can result in a player which no longer reports
    that it has audio, which in turn results in Now Playing no longer considering
    the web page to be an eligable now playing application. Bridge this gap by also
    taking AVPlayerItem.hasEnabledAudio into account when determining whether the
    player has audio.

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

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

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (248985 => 248986)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-22 01:25:36 UTC (rev 248985)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-08-22 01:25:41 UTC (rev 248986)
@@ -1,5 +1,46 @@
 2019-08-21  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r248952. rdar://problem/54579626
+
+    [iOS] HLS streams disappear from Now Playing when paused on the lock screen
+    https://bugs.webkit.org/show_bug.cgi?id=200951
+    <rdar://problem/54534301>
+    
+    Reviewed by Eric Carlson.
+    
+    The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
+    changing buffering policy) which can result in a player which no longer reports
+    that it has audio, which in turn results in Now Playing no longer considering
+    the web page to be an eligable now playing application. Bridge this gap by also
+    taking AVPlayerItem.hasEnabledAudio into account when determining whether the
+    player has audio.
+    
+    * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+    (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-21  Jer Noble  <jer.no...@apple.com>
+
+            [iOS] HLS streams disappear from Now Playing when paused on the lock screen
+            https://bugs.webkit.org/show_bug.cgi?id=200951
+            <rdar://problem/54534301>
+
+            Reviewed by Eric Carlson.
+
+            The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
+            changing buffering policy) which can result in a player which no longer reports
+            that it has audio, which in turn results in Now Playing no longer considering
+            the web page to be an eligable now playing application. Bridge this gap by also
+            taking AVPlayerItem.hasEnabledAudio into account when determining whether the
+            player has audio.
+
+            * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+            (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
+
+2019-08-21  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r248944. rdar://problem/54579628
 
     REGRESSION: naver.com - Multiple taps are required to open email

Modified: branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (248985 => 248986)


--- branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-08-22 01:25:36 UTC (rev 248985)
+++ branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-08-22 01:25:41 UTC (rev 248986)
@@ -1836,6 +1836,12 @@
         hasAudio |= (m_audibleGroup && m_audibleGroup->selectedOption());
         hasVideo |= (m_visualGroup && m_visualGroup->selectedOption());
 
+        // HLS streams will occasionally recreate all their tracks; during seek and after
+        // buffering policy changes. "debounce" notifications which result in no enabled
+        // audio tracks by also taking AVPlayerItem.hasEnabledAudio into account when determining
+        // whethere there is any audio present.
+        hasAudio |= m_cachedHasEnabledAudio;
+
         // Always says we have video if the AVPlayerLayer is ready for diaplay to work around
         // an AVFoundation bug which causes it to sometimes claim a track is disabled even
         // when it is not.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to