[iOS] do not exit AirPlay when the screen locks
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Apr 2016 00:52:55 +0000 (00:52 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 30 Apr 2016 00:52:55 +0000 (00:52 +0000)
commitd0383c3c226e91a15657d2c5810e4aaab3a23597
tree0a330fdd0e0a621146cce37fc47354621db93c53
parent00bb7344b0a03e0e893e4a6ac2051d098e4a5903
[iOS] do not exit AirPlay when the screen locks
https://bugs.webkit.org/show_bug.cgi?id=156502
<rdar://problem/24616592>

Reviewed by Dean Jackson

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::pendingActionTimerFired): Use m_isPlayingToWirelessTarget.
(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Ditto.
(WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): Set m_isPlayingToWirelessTarget.
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Use
  m_isPlayingToWirelessTarget.
(WebCore::HTMLMediaElement::isPlayingToWirelessPlaybackTarget): Ditto.
(WebCore::HTMLMediaElement::configureMediaControls): Ditto.
(WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction): Add logging.
(WebCore::HTMLMediaElement::purgeBufferedDataIfPossible): Don't tell the media engine to purge
  data if it is playing to a wireless target because that will drop the connection.
* html/HTMLMediaElement.h:

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted): Add logging.
(WebCore::MediaElementSession::canPlayToWirelessPlaybackTarget): Drive by fix: iOS doesn't
  have an explicit playbackTarget, don't test for it.
(WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/MediaElementSession.cpp