RESOLVED FIXED 157553
If previous media session interruptions were prevented, still allow subsequent interruptions to try.
https://bugs.webkit.org/show_bug.cgi?id=157553
Summary If previous media session interruptions were prevented, still allow subsequen...
Jeremy Jones
Reported 2016-05-10 19:08:15 PDT
If previous media session interruptions were prevented, still allow subsequent interruptions to try.
Attachments
Patch (2.16 KB, patch)
2016-05-10 19:16 PDT, Jeremy Jones
no flags
Patch (2.14 KB, patch)
2016-05-11 11:02 PDT, Jeremy Jones
no flags
Patch (9.81 KB, patch)
2016-06-27 13:38 PDT, Jeremy Jones
eric.carlson: review+
Patch for landing. (12.67 KB, patch)
2016-07-18 16:32 PDT, Jeremy Jones
no flags
Patch for landing. (12.73 KB, patch)
2016-07-18 16:34 PDT, Jeremy Jones
no flags
Jeremy Jones
Comment 1 2016-05-10 19:09:11 PDT
Jeremy Jones
Comment 2 2016-05-10 19:16:03 PDT
Eric Carlson
Comment 3 2016-05-11 08:00:07 PDT
Comment on attachment 278571 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=278571&action=review > Source/WebCore/ChangeLog:4 > + If previous media session interruptions were prevented, still allow subsequent interruptions to try. > + https://bugs.webkit.org/show_bug.cgi?id=157553 Please include the Radar number as well. > Source/WebCore/platform/audio/PlatformMediaSession.cpp:102 > + Nit: tab be gone. > Source/WebCore/platform/audio/PlatformMediaSession.cpp:103 > + if (++m_interruptionCount > 1 && m_interruptionType != NoInterruption) Have you verified that there are no side effects of allowing all nested interruptions through?
Jeremy Jones
Comment 4 2016-05-11 11:01:57 PDT
(In reply to comment #3) > Comment on attachment 278571 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=278571&action=review > > > Source/WebCore/ChangeLog:4 > > + If previous media session interruptions were prevented, still allow subsequent interruptions to try. > > + https://bugs.webkit.org/show_bug.cgi?id=157553 > > Please include the Radar number as well. Done. > > > Source/WebCore/platform/audio/PlatformMediaSession.cpp:102 > > + > > Nit: tab be gone. Done. > > > Source/WebCore/platform/audio/PlatformMediaSession.cpp:103 > > + if (++m_interruptionCount > 1 && m_interruptionType != NoInterruption) > > Have you verified that there are no side effects of allowing all nested > interruptions through? I don't want to allow all nested interruptions. I only want to allow interruptions if the previous interruption was ignored. We only ignore EnteringBackground for m_isPlayingToWirelessTarget or Picture in Picture. If we receive any of the other interruptions after that, I would want the interruption to succeed even though the app is in the background.
Jeremy Jones
Comment 5 2016-05-11 11:02:42 PDT
Eric Carlson
Comment 6 2016-05-11 11:53:15 PDT
(In reply to comment #4) > (In reply to comment #3) > > > Source/WebCore/platform/audio/PlatformMediaSession.cpp:103 > > > + if (++m_interruptionCount > 1 && m_interruptionType != NoInterruption) > > > > Have you verified that there are no side effects of allowing all nested > > interruptions through? > > I don't want to allow all nested interruptions. I only want to allow > interruptions if the previous interruption was ignored. > > We only ignore EnteringBackground for m_isPlayingToWirelessTarget or Picture > in Picture. If we receive any of the other interruptions after that, I would > want the interruption to succeed even though the app is in the background. Isn't 'NoInterruption' only set in endInterruption? In any case, this change definitely needs a layout test to verify that nested interruptions of various types behave as expected.
Jeremy Jones
Comment 7 2016-06-27 13:38:35 PDT
Eric Carlson
Comment 8 2016-06-27 14:21:10 PDT
Comment on attachment 282164 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282164&action=review > Source/WebCore/platform/audio/PlatformMediaSession.cpp:103 > + if (++m_interruptionCount > 1 && m_interruptionType != NoInterruption) A comment about why this works would be helpful. > LayoutTests/ChangeLog:17 > + This test is for iPad only, so it must be run manually. Is "it must be run manually" true?
Jeremy Jones
Comment 9 2016-07-18 16:02:35 PDT
(In reply to comment #8) > Comment on attachment 282164 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=282164&action=review > > > Source/WebCore/platform/audio/PlatformMediaSession.cpp:103 > > + if (++m_interruptionCount > 1 && m_interruptionType != NoInterruption) > > A comment about why this works would be helpful. // When interruptions are overridden, m_interruptionType doesn't get set. // Give nested interruptions a chance when the previous interruptions were overridden. > > > LayoutTests/ChangeLog:17 > > + This test is for iPad only, so it must be run manually. > > Is "it must be run manually" true? Tests can't specify that they are iPad only.
Jeremy Jones
Comment 10 2016-07-18 16:32:41 PDT
Created attachment 283954 [details] Patch for landing.
Jeremy Jones
Comment 11 2016-07-18 16:34:34 PDT
Created attachment 283957 [details] Patch for landing.
WebKit Commit Bot
Comment 12 2016-07-18 17:48:35 PDT
Comment on attachment 283957 [details] Patch for landing. Clearing flags on attachment: 283957 Committed r203388: <http://trac.webkit.org/changeset/203388>
Note You need to log in before you can comment on or make changes to this bug.