Bug 197527 - HLS videos not rendered when used as WebGL textures until canvas is resized
Summary: HLS videos not rendered when used as WebGL textures until canvas is resized
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad iOS 12
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-02 12:58 PDT by Pavel Pomerantsev
Modified: 2021-03-18 03:05 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Pomerantsev 2019-05-02 12:58:38 PDT
If an HLS video is used as a WebGL texture, it's not displayed initially.
In order to display it, the WebGL canvas needs to be resized (`canvas.width` or `canvas.height` needs to change after the video has started playing).
HLS videos as textures are working correctly in iOS 12.0.1 (16A404), but not in iOS 12.2 (16E227). It doesn't seem to be OS-version-dependent rather than hardware-dependent (I tested it on a few different iPhone models).
Here's a minimal reproduction of the issue: http://ios-bug-demo.s3-website-us-east-1.amazonaws.com/ — in desktop Safari and in older iOS Safari versions the video is displayed inside the canvas as soon as video starts playing, but in iOS 12.2 you have to additionally click on the canvas to see the video.
Comment 1 Radar WebKit Bug Importer 2019-05-08 11:30:41 PDT
<rdar://problem/50589167>
Comment 2 Radar WebKit Bug Importer 2019-05-08 11:30:44 PDT
<rdar://problem/50589169>
Comment 3 Kimmo Kinnunen 2021-03-18 03:05:59 PDT
Thanks for the report.
I think the test-case outputs some errors related to video element not having the video content.
In ThreeJS I think there's a VideoTexture that could be used.

If there's further problems with current iOS, please reopen and maybe revise the test case a bit.