WebKit Bugzilla
Attachment 342218 Details for
Bug 186415
: REGRESSION: Cannot listen to audio on Google Translate with side switch set to "vibrate"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186415-20180607162003.patch (text/plain), 4.42 KB, created by
Jer Noble
on 2018-06-07 16:20:08 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-07 16:20:08 PDT
Size:
4.42 KB
patch
obsolete
>Subversion Revision: 232546 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e78e5833913ee31f92233a14b8fb956da9cdf328..5a10d42b4ddedfa73817dba3b9c5f6bbbd34fea0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-06-07 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION: Cannot listen to audio on Google Translate with side switch set to "vibrate" >+ https://bugs.webkit.org/show_bug.cgi?id=186415 >+ <rdar://problem/40584651> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: platform/mac/media/audio-session-category-audio-autoplay.html >+ >+ Make sure that the PlatformMediaSession's state has already been set when calling sessionWillBeginPlayback(), >+ so that it's state is accounted for in updateStates(); >+ >+ * platform/audio/PlatformMediaSession.cpp: >+ (WebCore::PlatformMediaSession::clientWillBeginPlayback): >+ > 2018-06-06 Timothy Hatcher <timothy@apple.com> > > Wrong NSVisualEffectMaterial used for exit full screen overlay in dark mode. >diff --git a/Source/WebCore/platform/audio/PlatformMediaSession.cpp b/Source/WebCore/platform/audio/PlatformMediaSession.cpp >index d56e7bdab167b2e19210971c21422a67f7a4ac07..45bf7afb34699a2f411153da451a2559a32318cd 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSession.cpp >+++ b/Source/WebCore/platform/audio/PlatformMediaSession.cpp >@@ -182,13 +182,16 @@ bool PlatformMediaSession::clientWillBeginPlayback() > if (m_notifyingClient) > return true; > >+ auto oldState = state(); >+ setState(Playing); >+ > if (!PlatformMediaSessionManager::sharedManager().sessionWillBeginPlayback(*this)) { >+ setState(oldState); > if (state() == Interrupted) > m_stateToRestore = Playing; > return false; > } > >- setState(Playing); > return true; > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 59d3e1c117bd63ba78d51acd5923b81199f78a6e..b49b07ef083013d75e53dfd094b37cbf5b03da56 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-07 Jer Noble <jer.noble@apple.com> >+ >+ REGRESSION: Cannot listen to audio on Google Translate with side switch set to "vibrate" >+ https://bugs.webkit.org/show_bug.cgi?id=186415 >+ <rdar://problem/40584651> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/mac/media/audio-session-category-audio-autoplay-expected.txt: Added. >+ * platform/mac/media/audio-session-category-audio-autoplay.html: Added. >+ > 2018-06-06 Jer Noble <jer.noble@apple.com> > > Regions outside of the fullscreen window are exposed during zoom operations >diff --git a/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay-expected.txt b/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a11c27cae3a7a2ffd74225f22ea2000992b74d64 >--- /dev/null >+++ b/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay-expected.txt >@@ -0,0 +1,8 @@ >+ >+RUN(internals.settings.setShouldManageAudioSessionCategory(true)) >+RUN(audio.autoplay = true) >+RUN(audio.src = findMediaFile("audio", "../../../media/content/test")) >+EVENT(playing) >+EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK >+END OF TEST >+ >diff --git a/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html b/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html >new file mode 100644 >index 0000000000000000000000000000000000000000..5d8f4bfc7130664766e29707cf6d07f11bbbb7cf >--- /dev/null >+++ b/LayoutTests/platform/mac/media/audio-session-category-audio-autoplay.html >@@ -0,0 +1,25 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <title>audio-session-category-track-change</title> >+ <script src="../../../media/video-test.js"></script> >+ <script src="../../../media/media-file.js"></script> >+ <script> >+ function go() { >+ audio = video = mediaElement = document.querySelector('audio'); >+ run('internals.settings.setShouldManageAudioSessionCategory(true)'); >+ run('audio.autoplay = true'); >+ run('audio.src = findMediaFile("audio", "../../../media/content/test")'); >+ waitForEvent('playing', playing); >+ } >+ >+ function playing() { >+ testExpected('internals.audioSessionCategory()', 'MediaPlayback'); >+ endTest(); >+ } >+ </script> >+</head> >+<body onload="go()"> >+ <audio controls></video> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186415
:
342214
|
342218
|
342223
|
342321