Bug 215213 - [iOS 14] MediaStream becomes inactive after video it was assigned to is removed from the DOM
Summary: [iOS 14] MediaStream becomes inactive after video it was assigned to is remov...
Status: RESOLVED DUPLICATE of bug 214262
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-06 05:09 PDT by Artjom
Modified: 2020-08-10 09:29 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artjom 2020-08-06 05:09:36 PDT
OS: iOS 14 Beta 3

Steps:

1. Request a stream with getUserMedia and feed it into <video> via srcObject
2. Remove video from the DOM
3. After ~5 seconds camera stream becomes inactive. Camera recording icon gets hidden from url bar, and stream.active returns false.

Small demo to reproduce: https://codesandbox.io/s/smoosh-thunder-1frcl?file=/index.html

Not sure if this is desired behaviour, but it doesn't happen with Safari 13.
Comment 1 Radar WebKit Bug Importer 2020-08-06 10:44:00 PDT
<rdar://problem/66634379>
Comment 2 youenn fablet 2020-08-06 10:54:06 PDT
Thanks Artjom, this might be the memory leak that happens when video element is not rendered but playing.
This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=214262 patch in https://trac.webkit.org/changeset/264312.
I would think this change is included in latest iOS beta 4.
Can you validate this?
Comment 3 Artjom 2020-08-10 00:25:36 PDT
(In reply to youenn fablet from comment #2)
> Thanks Artjom, this might be the memory leak that happens when video element
> is not rendered but playing.
> This should be fixed by https://bugs.webkit.org/show_bug.cgi?id=214262 patch
> in https://trac.webkit.org/changeset/264312.
> I would think this change is included in latest iOS beta 4.
> Can you validate this?

Yes, updating to Beta 4 resolved the issue. Thanks.
Comment 4 Alexey Proskuryakov 2020-08-10 09:29:37 PDT

*** This bug has been marked as a duplicate of bug 214262 ***