Title: [234339] trunk/Source/WebCore
Revision
234339
Author
[email protected]
Date
2018-07-27 17:24:03 -0700 (Fri, 27 Jul 2018)

Log Message

[iOS] Don't deactivate audio session
https://bugs.webkit.org/show_bug.cgi?id=188127
<rdar://problem/42544143>

Reviewed by Jon Lee.

r233435 includes a change that deactivates the shared audio session when there are no more
active media sessions. This is a good in WK2 because it allows other applications to resume
playing audio when WebKit stops playing, but it is potentially bad in WK1 where the host
app may also be playing audio.

* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::removeSession): Don't deactivate the audio session.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234338 => 234339)


--- trunk/Source/WebCore/ChangeLog	2018-07-28 00:17:47 UTC (rev 234338)
+++ trunk/Source/WebCore/ChangeLog	2018-07-28 00:24:03 UTC (rev 234339)
@@ -1,3 +1,19 @@
+2018-07-27  Eric Carlson  <[email protected]>
+
+        [iOS] Don't deactivate audio session
+        https://bugs.webkit.org/show_bug.cgi?id=188127
+        <rdar://problem/42544143>
+
+        Reviewed by Jon Lee.
+        
+        r233435 includes a change that deactivates the shared audio session when there are no more
+        active media sessions. This is a good in WK2 because it allows other applications to resume
+        playing audio when WebKit stops playing, but it is potentially bad in WK1 where the host
+        app may also be playing audio.
+
+        * platform/audio/PlatformMediaSessionManager.cpp:
+        (WebCore::PlatformMediaSessionManager::removeSession): Don't deactivate the audio session.
+
 2018-07-27  Chris Dumez  <[email protected]>
 
         Fix thread-safety issues related to RealtimeMediaSource::audioSamplesAvailable()

Modified: trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp (234338 => 234339)


--- trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2018-07-28 00:17:47 UTC (rev 234338)
+++ trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp	2018-07-28 00:24:03 UTC (rev 234339)
@@ -162,9 +162,6 @@
     if (m_sessions.isEmpty() || std::all_of(m_sessions.begin(), m_sessions.end(), std::logical_not<void>())) {
         m_remoteCommandListener = nullptr;
         m_audioHardwareListener = nullptr;
-#if USE(AUDIO_SESSION)
-        AudioSession::sharedSession().tryToSetActive(false);
-#endif
     }
 
     scheduleUpdateSessionState();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to