⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248952 in webkit


Ignore:
Timestamp:
Aug 21, 2019, 11:19:23 AM (7 years ago)
Author:
jer.noble@apple.com
Message:

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

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r248946 r248952  
     12019-08-21  Jer Noble  <jer.noble@apple.com>
     2
     3        [iOS] HLS streams disappear from Now Playing when paused on the lock screen
     4        https://bugs.webkit.org/show_bug.cgi?id=200951
     5        <rdar://problem/54534301>
     6
     7        Reviewed by Eric Carlson.
     8
     9        The AVPlayerItemTracks will get recreated on occasion (during seeks, and when
     10        changing buffering policy) which can result in a player which no longer reports
     11        that it has audio, which in turn results in Now Playing no longer considering
     12        the web page to be an eligable now playing application. Bridge this gap by also
     13        taking AVPlayerItem.hasEnabledAudio into account when determining whether the
     14        player has audio.
     15
     16        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     17        (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
     18
    1192019-08-21  Adrian Perez de Castro  <aperez@igalia.com>
    220
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r248846 r248952  
    18371837        hasVideo |= (m_visualGroup && m_visualGroup->selectedOption());
    18381838
     1839        // HLS streams will occasionally recreate all their tracks; during seek and after
     1840        // buffering policy changes. "debounce" notifications which result in no enabled
     1841        // audio tracks by also taking AVPlayerItem.hasEnabledAudio into account when determining
     1842        // whethere there is any audio present.
     1843        hasAudio |= m_cachedHasEnabledAudio;
     1844
    18391845        // Always says we have video if the AVPlayerLayer is ready for diaplay to work around
    18401846        // an AVFoundation bug which causes it to sometimes claim a track is disabled even
Note: See TracChangeset for help on using the changeset viewer.