WebKit Bugzilla
Attachment 357250 Details for
Bug 192679
: Trying to play a media element synchronously after setting srcObject should succeed without user gesture
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192679-20181213135549.patch (text/plain), 4.44 KB, created by
youenn fablet
on 2018-12-13 13:55:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-12-13 13:55:43 PST
Size:
4.44 KB
patch
obsolete
>Subversion Revision: 239107 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2c68475dab6c0a7352e3ec1e4590f36ac3daf778..66f433405664ea9b68655b0eb2e683d470e0eb3a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-13 Youenn Fablet <youenn@apple.com> >+ >+ Trying to play a media element synchronously after setting srcObject should succeed without user gesture >+ https://bugs.webkit.org/show_bug.cgi?id=192679 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Check the srcObject mediaProvider value which is set synchronously. >+ Covered by updated fast/mediastream/local-audio-playing-event.html. >+ >+ * html/HTMLMediaElement.h: >+ (WebCore::HTMLMediaElement::hasMediaStreamSrcObject const): >+ > 2018-12-13 Youenn Fablet <youenn@apple.com> > > Change of msid information in the SDP should trigger the corresponding track events >diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h >index 360af8674cf8806212bc8259a98f57083988a2d2..0c871593e285867c3bd82aa86107fbbf643af6da 100644 >--- a/Source/WebCore/html/HTMLMediaElement.h >+++ b/Source/WebCore/html/HTMLMediaElement.h >@@ -553,7 +553,7 @@ public: > > #if ENABLE(MEDIA_STREAM) > void mediaStreamCaptureStarted() { resumeAutoplaying(); } >- bool hasMediaStreamSrcObject() const { return !!m_mediaStreamSrcObject; } >+ bool hasMediaStreamSrcObject() const { return m_mediaProvider && WTF::holds_alternative<RefPtr<MediaStream>>(*m_mediaProvider); } > #endif > > bool supportsSeeking() const override; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 207cbdf853b5d3bb76423c3320b907da8d441a01..35ebfd1ce87e05f92dce08b13ee28bd24db0b126 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-12-13 Youenn Fablet <youenn@apple.com> >+ >+ Trying to play a media element synchronously after setting srcObject should succeed without user gesture >+ https://bugs.webkit.org/show_bug.cgi?id=192679 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/mediastream/local-audio-playing-event-expected.txt: >+ * fast/mediastream/local-audio-playing-event.html: >+ > 2018-12-12 Youenn Fablet <youenn@apple.com> > > Recycling the m section should work if it was rejected remotely >diff --git a/LayoutTests/fast/mediastream/local-audio-playing-event-expected.txt b/LayoutTests/fast/mediastream/local-audio-playing-event-expected.txt >index 714564fae08c387e7ee7668deac288812256c088..359727f2b6f26039e37512336adbd30425a3f4b3 100644 >--- a/LayoutTests/fast/mediastream/local-audio-playing-event-expected.txt >+++ b/LayoutTests/fast/mediastream/local-audio-playing-event-expected.txt >@@ -1,3 +1,4 @@ > > PASS Local audio playback fires playing event >+PASS Calling play synchronously after setting srcObject shoud play and fire playing event > >diff --git a/LayoutTests/fast/mediastream/local-audio-playing-event.html b/LayoutTests/fast/mediastream/local-audio-playing-event.html >index ac7bb30e5d4ee685b93345688802e2c13b451eb4..dc49e58ecf66fa0fb6d1e926475501e0daf0c009 100644 >--- a/LayoutTests/fast/mediastream/local-audio-playing-event.html >+++ b/LayoutTests/fast/mediastream/local-audio-playing-event.html >@@ -8,19 +8,23 @@ > </head> > <body> > <audio id="audio" autoplay></audio> >+ <audio id="audioNoAutoplay" autoplay></audio> > <script> > if (window.testRunner) > testRunner.setUserMediaPermission(true); > >- var audio = document.getElementById('audio'); >- >- promise_test((test) => { >- return navigator.mediaDevices.getUserMedia({audio: true}).then((stream) => { >- audio.srcObject = stream; >- var eventWatcher = new EventWatcher(test, audio, 'playing'); >- return eventWatcher.wait_for('playing'); >- }); >+ promise_test(async (test) => { >+ audio.srcObject = await navigator.mediaDevices.getUserMedia({audio: true}); >+ var eventWatcher = new EventWatcher(test, audio, 'playing'); >+ return eventWatcher.wait_for('playing'); > }, 'Local audio playback fires playing event'); >+ >+ promise_test(async (test) => { >+ audioNoAutoplay.srcObject = await navigator.mediaDevices.getUserMedia({audio: true}); >+ audioNoAutoplay.play(); >+ var eventWatcher = new EventWatcher(test, audioNoAutoplay, 'playing'); >+ return eventWatcher.wait_for('playing'); >+ }, 'Calling play synchronously after setting srcObject shoud play and fire playing event'); > </script> > </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 192679
: 357250