WebKit Bugzilla
Attachment 342321 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 for landing
bug-186415-20180608140245.patch (text/plain), 6.28 KB, created by
Jer Noble
on 2018-06-08 14:02:46 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Jer Noble
Created:
2018-06-08 14:02:46 PDT
Size:
6.28 KB
patch
obsolete
>Subversion Revision: 232546 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e78e5833913ee31f92233a14b8fb956da9cdf328..b63ce4aa99f886a88dff4ac9d169c938911f5c60 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+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 updateSessionStates(). >+ >+ * platform/audio/PlatformMediaSession.cpp: >+ (WebCore::PlatformMediaSession::setState): >+ * platform/audio/PlatformMediaSessionManager.cpp: >+ (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): >+ (WebCore::PlatformMediaSessionManager::sessionStateChanged): >+ > 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..7339944548bcfbd38562a8b97c92e9fb65d5b31d 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSession.cpp >+++ b/Source/WebCore/platform/audio/PlatformMediaSession.cpp >@@ -112,8 +112,12 @@ PlatformMediaSession::~PlatformMediaSession() > > void PlatformMediaSession::setState(State state) > { >+ if (state == m_state) >+ return; >+ > INFO_LOG(LOGIDENTIFIER, state); > m_state = state; >+ PlatformMediaSessionManager::sharedManager().sessionStateChanged(*this); > } > > void PlatformMediaSession::beginInterruption(InterruptionType type) >diff --git a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >index 3277b1a088377ea193459a86403946bcc98cefcd..f06aa91d68bf351b449207af5bfe34991910f3db 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >+++ b/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp >@@ -213,7 +213,6 @@ bool PlatformMediaSessionManager::sessionWillBeginPlayback(PlatformMediaSession& > oneSession.pauseSession(); > }); > >- updateSessionState(); > return true; > } > >@@ -249,6 +248,11 @@ void PlatformMediaSessionManager::sessionWillEndPlayback(PlatformMediaSession& s > LOG(Media, "PlatformMediaSessionManager::sessionWillEndPlayback - session moved from index %zu to %zu", pausingSessionIndex, lastPlayingSessionIndex); > } > >+void PlatformMediaSessionManager::sessionStateChanged(PlatformMediaSession&) >+{ >+ updateSessionState(); >+} >+ > void PlatformMediaSessionManager::setCurrentSession(PlatformMediaSession& session) > { > LOG(Media, "PlatformMediaSessionManager::setCurrentSession - %p", &session); >diff --git a/Source/WebCore/platform/audio/PlatformMediaSessionManager.h b/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >index 9897e6a5ffadb8d16173d861e6eb36af040614f3..b8b7ceadecc8ddcf6530af036c9b120cbd95265e 100644 >--- a/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >+++ b/Source/WebCore/platform/audio/PlatformMediaSessionManager.h >@@ -94,6 +94,7 @@ public: > > virtual bool sessionWillBeginPlayback(PlatformMediaSession&); > virtual void sessionWillEndPlayback(PlatformMediaSession&); >+ virtual void sessionStateChanged(PlatformMediaSession&); > virtual void sessionDidEndRemoteScrubbing(const PlatformMediaSession&) { }; > virtual void clientCharacteristicsChanged(PlatformMediaSession&) { } > >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
Flags:
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186415
:
342214
|
342218
|
342223
| 342321