Title: [258839] trunk/Source/WebCore
Revision
258839
Author
[email protected]
Date
2020-03-23 07:33:42 -0700 (Mon, 23 Mar 2020)

Log Message

AudioMediaStreamTrackRendererCocoa does not recover from AudioSession interruption
https://bugs.webkit.org/show_bug.cgi?id=209412

Reviewed by Eric Carlson.

In case there is an AudioSession interruption, like the app is in the background
and another app starts to play audio, AudioMediaStreamTrackRendererCocoa will not restart playing audio.
Fix this by clearing the AudioUnit when starting since the renderer is paused during the interruption.
This ensures resuming from the interruption in a clean state.

Manually tested.

* platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
(WebCore::AudioMediaStreamTrackRendererCocoa::start):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (258838 => 258839)


--- trunk/Source/WebCore/ChangeLog	2020-03-23 14:26:33 UTC (rev 258838)
+++ trunk/Source/WebCore/ChangeLog	2020-03-23 14:33:42 UTC (rev 258839)
@@ -1,3 +1,20 @@
+2020-03-23  Youenn Fablet  <[email protected]>
+
+        AudioMediaStreamTrackRendererCocoa does not recover from AudioSession interruption
+        https://bugs.webkit.org/show_bug.cgi?id=209412
+
+        Reviewed by Eric Carlson.
+
+        In case there is an AudioSession interruption, like the app is in the background
+        and another app starts to play audio, AudioMediaStreamTrackRendererCocoa will not restart playing audio.
+        Fix this by clearing the AudioUnit when starting since the renderer is paused during the interruption.
+        This ensures resuming from the interruption in a clean state.
+
+        Manually tested.
+
+        * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp:
+        (WebCore::AudioMediaStreamTrackRendererCocoa::start):
+
 2020-03-23  youenn fablet  <[email protected]>
 
         MediaDevices::refreshDevices should take device type into account

Modified: trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp (258838 => 258839)


--- trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp	2020-03-23 14:26:33 UTC (rev 258838)
+++ trunk/Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp	2020-03-23 14:33:42 UTC (rev 258839)
@@ -45,6 +45,8 @@
 
 void AudioMediaStreamTrackRendererCocoa::start()
 {
+    clear();
+
     m_shouldPlay = true;
 
     if (m_dataSource)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to