Bug 170969 - Limit to number of video elements created on iOS, even if old ones are removed
Summary: Limit to number of video elements created on iOS, even if old ones are removed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 10
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-18 15:32 PDT by Jonathan Deutsch
Modified: 2017-04-19 13:26 PDT (History)
4 users (show)

See Also:


Attachments
reproduction html and video file (2.14 MB, application/zip)
2017-04-18 15:32 PDT, Jonathan Deutsch
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Deutsch 2017-04-18 15:32:31 PDT
Created attachment 307427 [details]
reproduction html and video file

A webpage on iOS (iPhone) appears to have a limit on the amount of <video> elements that can be created. Even if old ones are destroyed, the limit remains. This is problematic for code that dynamically changes the DOM and may include videos, because at some point the videos will stop being displayed.

To reproduce, use the attached newvideo.html file. Clicking the button will start a loop that will replace the video element every 3 seconds in a dynamic fashion. At some point, you will just get a video element with the play icon crossed out, and no more videos will play.
Comment 1 Radar WebKit Bug Importer 2017-04-18 18:40:41 PDT
<rdar://problem/31697589>
Comment 2 Jon Lee 2017-04-18 18:58:30 PDT
Jonathan, is this a regression? Which iPhones and/or iPads have tested this on?
Comment 3 Jonathan Deutsch 2017-04-19 13:26:43 PDT
I don't know if this is a regression, but is at least a more common occurrence with users including video via the new playsinline attribute.

I personally just tested with an iPhone 7. The two user reports we definitively linked with the issue only stated "iOS." Both reports came in after 10.3 was released.

I haven't tested, but I would guess this may affect other heavy DOM manipulators like React.