Bug 188088 - Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
Summary: Calling getUserMedia in a link that was opened with target="_blank" does not ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 11
Hardware: iPhone / iPad iOS 11
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-07-26 19:05 PDT by Adam
Modified: 2022-11-25 19:44 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.33 KB, patch)
2018-11-15 17:00 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Fix for getusermedia bug (9 bytes, patch)
2020-06-08 05:44 PDT, Peggy Sharifi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)