Bug 148724 - [iOS] Playback does not pause when deselecting route and locking screen.
Summary: [iOS] Playback does not pause when deselecting route and locking screen.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-02 14:15 PDT by Jer Noble
Modified: 2015-12-02 13:24 PST (History)
2 users (show)

See Also:


Attachments
Patch (9.78 KB, patch)
2015-09-02 16:09 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (8.19 KB, patch)
2015-09-02 16:25 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>