Always use MediaPlayback audio category when playing to AppleTV
[WebKit-https.git] / Source / WebCore / platform / audio / cocoa / MediaSessionManagerCocoa.cpp
index 3fe59cf70ea5bb2cdd00f46c53a9a6cc7e0468f0..b3e16279df8b95c51526d5772f5480b8a37dcd1a 100644 (file)
@@ -40,7 +40,7 @@ static const size_t kLowPowerVideoBufferSize = 4096;
 
 void PlatformMediaSessionManager::updateSessionState()
 {
-    LOG(Media, "PlatformMediaSessionManager::updateSessionState() - types: Video(%d), Audio(%d), WebAudio(%d)", count(PlatformMediaSession::Video), count(PlatformMediaSession::Audio), count(PlatformMediaSession::WebAudio));
+    LOG(Media, "PlatformMediaSessionManager::scheduleUpdateSessionState() - types: Video(%d), Audio(%d), WebAudio(%d)", count(PlatformMediaSession::Video), count(PlatformMediaSession::Audio), count(PlatformMediaSession::WebAudio));
 
     if (has(PlatformMediaSession::WebAudio))
         AudioSession::sharedSession().setPreferredBufferSize(kWebAudioBufferSize);
@@ -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);
     });