Bug 227165 - Using existing HTMLVideoElement as source for texImage2D causes the video to disappear in HTMLVideoElement in Safari
Summary: Using existing HTMLVideoElement as source for texImage2D causes the video to ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 14
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-18 03:40 PDT by pepelesne801
Modified: 2023-01-30 12:48 PST (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 pepelesne801 2021-06-18 03:40:21 PDT
When calling the WebGL's texImage2D to create a texture from an HTMLVideoElement, the texture is successfully created, but the existing HTMLVideoElement turns black, the sound can still be heard and the texture keeps getting updated with appropriate video frames. This only happens in Safari and works properly in other Browsers.
Comment 1 pepelesne801 2021-06-18 03:43:10 PDT
No errors are reported in console
Comment 2 Kimmo Kinnunen 2021-06-18 03:55:13 PDT
Could you post example content, such as file + small video that reproduces the error.
Or then a test case url that reproduces the error.

Locally you can develop the test case with local web server by doing:
sudo pip3 install rangehttpserver
python3 -m RangeHTTPServer 

and then browse http://localhost:8000
Comment 3 Radar WebKit Bug Importer 2021-06-25 03:41:18 PDT
<rdar://problem/79770670>
Comment 4 Scott Vanderbeck 2022-03-30 09:07:28 PDT
Here is an example of this bug still in action:

https://playground.babylonjs.com/#ZMCFYA#275

A video element being used with calls to texImage2D should appear in the upper left after a few seconds. It works fine in browsers besides Safari.

This makes it impossible to currently display a video on the DOM and in a 3d scene at the same time. A real problem for some use cases (click on a 3d screen to get a popup of a perfect 2d DOM view, etc.)