rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

VideoTexture position animation is inconsistent #326

Closed mauro1855 closed 2 years ago

mauro1855 commented 2 years ago

Hi Lightning SDK team,

I created recently a little project to see how I could create "video thumbnails" that start playing when I focus the element - it involved punching a hole in the canvas (with the HoleShader) and changing the position and size of the VideoPlayer (with VideoPlayer.position() and VideoPlayer.size() methods)

But I found that the VideoPlayer.position() behaviour is not consistent when textureMode is turned on or off.

I find this behaviour difference between texture and non-texture mode to be inconsistent, and provides an unpredictable and uncontrollable experience to developers. Not only with the VideoPlayer.position() method, but with the .size(), .show() and .hide() methods as well - the VideoTexture animates / smooths all of them, while the video tag is directly assigned the CSS style which takes effect immediately without animation. Besides being inconsistent, it is rather opinionated as well; it assumes the developer wants the smooth effect, while it might not be the case.

You can find the relevant code here and here.

Would you consider a PR to remove the smoothness out of the video texture?

Best regards, Mauro

michielvandergeest commented 2 years ago

Hi @mauro1855, thanks for your report.

Starting v5.0.0 the VideoPlayer plugin is no longer part of the Lightning-SDK. It’s been moved to the Metrological-SDK.

I’m not able to move issues between organizations, so I would suggest to open this issue as a new ticket over here.