Bug 148724

Summary: [iOS] Playback does not pause when deselecting route and locking screen.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
eric.carlson: review+
Patch for landing none

Description Jer Noble 2015-09-02 14:15:53 PDT
[iOS] Playback does not pause when deselecting route and locking screen.
Comment 1 Jer Noble 2015-09-02 15:14:25 PDT
<rdar://problem/22100651>
Comment 2 Jer Noble 2015-09-02 16:09:05 PDT
Created attachment 260449 [details]
Patch
Comment 3 Eric Carlson 2015-09-02 16:23:32 PDT
Comment on attachment 260449 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=260449&action=review

> Source/WebCore/html/MediaElementSession.cpp:295
> +    bool oldHasActiveRoute = m_playbackTarget && m_playbackTarget->hasActiveRoute();
> +    bool newHasActiveRoute = device->hasActiveRoute();
>      m_playbackTarget = WTF::move(device);
>      client().setWirelessPlaybackTarget(*m_playbackTarget.copyRef());
> +    if (oldHasActiveRoute != newHasActiveRoute)
> +        isPlayingToWirelessPlaybackTargetChanged(newHasActiveRoute);

as discussed on irc, this isn't correct or necessary for iOS.

> Source/WebCore/platform/audio/PlatformMediaSessionManager.h:61
> +    bool isApplicationInBackground() const { return m_isApplicationInBackground; }

Nit: this isn't used.
Comment 4 Jer Noble 2015-09-02 16:25:44 PDT
Created attachment 260453 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2015-09-03 16:53:39 PDT
Comment on attachment 260453 [details]
Patch for landing

Clearing flags on attachment: 260453

Committed r189322: <http://trac.webkit.org/changeset/189322>