Bug 188088

Summary: Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
Product: WebKit Reporter: Adam <adam>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: anonymousert+1, commit-queue, eric.carlson, jonlee, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: iPhone / iPad   
OS: iOS 11   
Attachments:
Description Flags
Patch
none
Fix for getusermedia bug none

Description Adam 2018-07-26 19:05:57 PDT
Steps to reproduce:

1. Visit http://jsbin.com/fegosaz
2. Click the link which will open a new window
3. Click allow to allow access to your microphone/camera
4. Wait to see yourself.
5. Close that tab
6. Click the link again
7. Click allow to allow access to your microphone/camera

Result: You never see yourself. All subsequent calls to getUserMedia just timeout and don't respond. The red microphone icon appears in the URL bar but not the camera icon.
Comment 1 Adam 2018-07-26 19:12:07 PDT
Actually, getUserMedia does respond, it's just that the video never starts playing. If you call stop() on all of the tracks before you close the new window then everything is fine. It's as if the access to the video isn't cleaned up properly until you close the original tab that opened that link.
Comment 2 Adam 2018-07-26 21:10:17 PDT
Actually you can call stop on all of the tracks and then call getUserMedia again immediately as a workaround.
Comment 3 Radar WebKit Bug Importer 2018-07-27 17:33:25 PDT
<rdar://problem/42681448>
Comment 4 youenn fablet 2018-11-15 17:00:42 PST
Created attachment 354999 [details]
Patch
Comment 5 Jon Lee 2018-12-04 11:10:39 PST
Time to check in?
Comment 6 WebKit Commit Bot 2018-12-04 12:58:04 PST
Comment on attachment 354999 [details]
Patch

Clearing flags on attachment: 354999

Committed r238873: <https://trac.webkit.org/changeset/238873>
Comment 7 WebKit Commit Bot 2018-12-04 12:58:05 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Peggy Sharifi 2020-06-08 05:44:54 PDT Comment hidden (obsolete)