[iOS] do not pause video when entering background while playing to external device
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 01:47:20 +0000 (01:47 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 May 2014 01:47:20 +0000 (01:47 +0000)
commit7b73c3422213b78273e2b6fab10996d5cbad058d
treed3edfdde41b7279cd4365f67cea7b4a1535552ac
parent310bc70b543434916399f3bdb1f8139967e6e827
[iOS] do not pause video when entering background while playing to external device
https://bugs.webkit.org/show_bug.cgi?id=132374

Reviewed by Jer Noble.

Source/WebCore:
* WebCore.exp.in: Update beginInterruption signature.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canOverrideBackgroundPlaybackRestriction): New, return true when
    playing to external device.
* html/HTMLMediaElement.h:

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::beginInterruption): Add interruption type to beginInterruption.
* platform/audio/MediaSession.h:

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::beginInterruption): Ditto.
(WebCore::MediaSessionManager::applicationWillEnterBackground): Ditto.
(WebCore::MediaSessionManager::systemWillSleep): Ditto.
* platform/audio/MediaSessionManager.h:

* platform/audio/ios/AudioDestinationIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper interruption:]): Ditto.

* platform/audio/mac/AudioDestinationMac.h: Make most methods private. Add
    canOverrideBackgroundPlaybackRestriction. Add missing overrides.
* testing/Internals.cpp:
(WebCore::Internals::beginMediaSessionInterruption): Pass interruption type.

Source/webkit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/audio/MediaSession.cpp
Source/WebCore/platform/audio/MediaSession.h
Source/WebCore/platform/audio/MediaSessionManager.cpp
Source/WebCore/platform/audio/MediaSessionManager.h
Source/WebCore/platform/audio/ios/AudioDestinationIOS.h
Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
Source/WebCore/platform/audio/mac/AudioDestinationMac.h
Source/WebCore/testing/Internals.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in