Title: [187516] trunk/Source/WebCore
- Revision
- 187516
- Author
- [email protected]
- Date
- 2015-07-28 14:42:56 -0700 (Tue, 28 Jul 2015)
Log Message
[iOS] Set AirPlay discovery mode to disabled when page is hidden
https://bugs.webkit.org/show_bug.cgi?id=147369
Reviewed by Jer Noble.
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::requiresPlaybackTargetRouteMonitoring): Return false when
the client is not visible.
* html/MediaElementSession.h:
* platform/audio/PlatformMediaSession.cpp:
(WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Call configureWireLessTargetMonitoring.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (187515 => 187516)
--- trunk/Source/WebCore/ChangeLog 2015-07-28 21:39:34 UTC (rev 187515)
+++ trunk/Source/WebCore/ChangeLog 2015-07-28 21:42:56 UTC (rev 187516)
@@ -1,3 +1,18 @@
+2015-07-28 Eric Carlson <[email protected]>
+
+ [iOS] Set AirPlay discovery mode to disabled when page is hidden
+ https://bugs.webkit.org/show_bug.cgi?id=147369
+
+ Reviewed by Jer Noble.
+
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::requiresPlaybackTargetRouteMonitoring): Return false when
+ the client is not visible.
+ * html/MediaElementSession.h:
+
+ * platform/audio/PlatformMediaSession.cpp:
+ (WebCore::PlatformMediaSession::clientDataBufferingTimerFired): Call configureWireLessTargetMonitoring.
+
2015-07-28 Said Abou-Hallawa <[email protected]>
Crash happens when calling removeEventListener for an SVG element which has an instance inside a <defs> element of shadow tree
Modified: trunk/Source/WebCore/html/MediaElementSession.cpp (187515 => 187516)
--- trunk/Source/WebCore/html/MediaElementSession.cpp 2015-07-28 21:39:34 UTC (rev 187515)
+++ trunk/Source/WebCore/html/MediaElementSession.cpp 2015-07-28 21:42:56 UTC (rev 187516)
@@ -413,6 +413,13 @@
return settings && settings->allowsPictureInPictureMediaPlayback() && !element.webkitCurrentPlaybackTargetIsWireless();
}
+#if PLATFORM(IOS)
+bool MediaElementSession::requiresPlaybackTargetRouteMonitoring() const
+{
+ return m_hasPlaybackTargetAvailabilityListeners && !client().elementIsHidden();
+}
+#endif
+
#if ENABLE(MEDIA_SOURCE)
const unsigned fiveMinutesOf1080PVideo = 290 * 1024 * 1024; // 290 MB is approximately 5 minutes of 8Mbps (1080p) content.
const unsigned fiveMinutesStereoAudio = 14 * 1024 * 1024; // 14 MB is approximately 5 minutes of 384kbps content.
Modified: trunk/Source/WebCore/html/MediaElementSession.h (187515 => 187516)
--- trunk/Source/WebCore/html/MediaElementSession.h 2015-07-28 21:39:34 UTC (rev 187515)
+++ trunk/Source/WebCore/html/MediaElementSession.h 2015-07-28 21:42:56 UTC (rev 187516)
@@ -112,7 +112,7 @@
virtual void setShouldPlayToPlaybackTarget(bool) override;
#endif
#if PLATFORM(IOS)
- bool requiresPlaybackTargetRouteMonitoring() const override { return m_hasPlaybackTargetAvailabilityListeners; }
+ bool requiresPlaybackTargetRouteMonitoring() const override;
#endif
BehaviorRestrictions m_restrictions;
Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp (187515 => 187516)
--- trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp 2015-07-28 21:39:34 UTC (rev 187515)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSession.cpp 2015-07-28 21:42:56 UTC (rev 187516)
@@ -201,6 +201,10 @@
updateClientDataBuffering();
+#if PLATFORM(IOS)
+ PlatformMediaSessionManager::sharedManager().configureWireLessTargetMonitoring();
+#endif
+
if (m_state != Playing || !m_client.elementIsHidden())
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes