https://bugs.webkit.org/show_bug.cgi?id=144408
Reviewed by Jer Noble.
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
to the target when it has not routes.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
element is <video> with a video track that does not block wireless playback.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183587
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-04-29 Eric Carlson <eric.carlson@apple.com>
+
+ [Mac] Register with device picker whenever a page has <video>
+ https://bugs.webkit.org/show_bug.cgi?id=144408
+
+ Reviewed by Jer Noble.
+
+ * Modules/mediasession/WebMediaSessionManager.cpp:
+ (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
+ to the target when it has not routes.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the
+ element is <video> with a video track that does not block wireless playback.
+
2015-04-29 Martin Robinson <mrobinson@igalia.com>
[GTK] Add support for automatic hyphenation
return;
auto& state = m_clientState[indexThatRequestedPicker];
- state->client->setShouldPlayToPlaybackTarget(state->contextId, true);
+ state->client->setShouldPlayToPlaybackTarget(state->contextId, m_playbackTarget && m_playbackTarget->hasActiveRoute());
state->requestedPicker = false;
}
MediaStateFlags state = IsNotPlaying;
+ bool hasActiveVideo = isVideo() && hasVideo();
#if ENABLE(WIRELESS_PLAYBACK_TARGET)
if (isPlayingToWirelessPlaybackTarget())
state |= IsPlayingToExternalDevice;
- if (m_hasPlaybackTargetAvailabilityListeners)
- state |= RequiresPlaybackTargetMonitoring;
+ if (!m_mediaSession->wirelessVideoPlaybackDisabled(*this)) {
+ if ((m_hasPlaybackTargetAvailabilityListeners || hasActiveVideo) && m_player->canPlayToWirelessPlaybackTarget())
+ state |= RequiresPlaybackTargetMonitoring;
+ }
#endif
if (!isPlaying())
if (hasAudio() && !muted())
state |= IsPlayingAudio;
- if (hasVideo())
+ if (hasActiveVideo)
state |= IsPlayingVideo;
return state;