Changeset 247182 in webkit


Ignore:
Timestamp:
Jul 5, 2019 3:24:07 PM (5 years ago)
Author:
jer.noble@apple.com
Message:

Revert change to block playback when process is ostensibly "suspended".
https://bugs.webkit.org/show_bug.cgi?id=199530

Reviewed by Eric Carlson.

In r243958, a drive-by-fix was added that blocked playback when the WebProcess thought it
was susposed to be suspended. The intent was to keep the AVAudioSession for the process
from being activated just before the process was suspended, and thus avoid receiving an
"interruption" and having the AVAudioSession deactivated out from under us upon resuming.

Unfortunately, this caused problems when another process resumes the WebContent process
in order to start playback; namely the Now Playing UI's play button. Because we may receive
the play command long before whe notice that we've been resumed, the WebContent process
may refuse to honor the play command because it thinks its supposed to be suspended.

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247180 r247182  
     12019-07-05  Jer Noble  <jer.noble@apple.com>
     2
     3        Revert change to block playback when process is ostensibly "suspended".
     4        https://bugs.webkit.org/show_bug.cgi?id=199530
     5
     6        Reviewed by Eric Carlson.
     7
     8        In r243958, a drive-by-fix was added that blocked playback when the WebProcess thought it
     9        was susposed to be suspended. The intent was to keep the AVAudioSession for the process
     10        from being activated just before the process was suspended, and thus avoid receiving an
     11        "interruption" and having the AVAudioSession deactivated out from under us upon resuming.
     12
     13        Unfortunately, this caused problems when another process resumes the WebContent process
     14        in order to start playback; namely the Now Playing UI's play button. Because we may receive
     15        the play command long before whe notice that we've been resumed, the WebContent process
     16        may refuse to honor the play command because it thinks its supposed to be suspended.
     17
     18        * platform/audio/PlatformMediaSessionManager.cpp:
     19        (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback):
     20
    1212019-07-05  Ryosuke Niwa  <rniwa@webkit.org>
    222
  • trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp

    r247118 r247182  
    210210    }
    211211
    212     if (m_processIsSuspended) {
    213         ALWAYS_LOG(LOGIDENTIFIER, session.logIdentifier(), " returning false because process is suspended");
    214         return false;
    215     }
    216 
    217212#if USE(AUDIO_SESSION)
    218213    if (activeAudioSessionRequired()) {
Note: See TracChangeset for help on using the changeset viewer.