Bug 170969

Summary: Limit to number of video elements created on iOS, even if old ones are removed
Product: WebKit Reporter: Jonathan Deutsch <jonathan>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: eric.carlson, jer.noble, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: iPhone / iPad   
OS: iOS 10   
Attachments:
Description Flags
reproduction html and video file none

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.