Always use MediaPlayback audio category when playing to AppleTV
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 20:48:58 +0000 (20:48 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2018 20:48:58 +0000 (20:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188230
<rdar://problem/42497809>

Reviewed by Jer Noble.

* platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
(PlatformMediaSessionManager::updateSessionState): Check session.isPlayingToWirelessPlaybackTarget().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234469 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.cpp

index b6b5f17e4c88eaf725bc3d06babfb10aea23d348..d8cdac9b4edda6b2ee549762ac112fdcd29d1a27 100644 (file)
@@ -1,3 +1,14 @@
+2018-08-01  Eric Carlson  <eric.carlson@apple.com>
+
+        Always use MediaPlayback audio category when playing to AppleTV
+        https://bugs.webkit.org/show_bug.cgi?id=188230
+        <rdar://problem/42497809>
+
+        Reviewed by Jer Noble.
+
+        * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
+        (PlatformMediaSessionManager::updateSessionState): Check session.isPlayingToWirelessPlaybackTarget().
+
 2018-08-01  Timothy Hatcher  <timothy@apple.com>
 
         Hardcode some system colors to avoid fingerprinting exposure.
index c958c32f7ed34f161719b249839d9cd23845262f..b3e16279df8b95c51526d5772f5480b8a37dcd1a 100644 (file)
@@ -72,6 +72,8 @@ void PlatformMediaSessionManager::updateSessionState()
             hasWebAudioType = true;
         if ((type == PlatformMediaSession::VideoAudio || type == PlatformMediaSession::Audio) && session.canProduceAudio() && session.state() == PlatformMediaSession::Playing)
             hasAudibleAudioOrVideoMediaType = true;
+        if (session.isPlayingToWirelessPlaybackTarget())
+            hasAudibleAudioOrVideoMediaType = true;
         return (type == PlatformMediaSession::MediaStreamCapturingAudio);
     });