bramus / view-transitions-demos

https://view-transitions.netlify.app/
Apache License 2.0
23 stars 2 forks source link

Video Zoom Deployment: Assignments to currentTime reset playback time to zero. #8

Open martrapp opened 1 month ago

martrapp commented 1 month ago

Hello @bramus, I have a question about the video zoom demo. At least in my current browsers (Chrome: 129.0.6668.90, Edge:129.0.2792.65) the demo works fine when I try it locally or deploy it remotely, but the “official” site (https://view-transitions.chrome.dev/) unfortunately doesn't work for me.

The assignments to $video.currentTime set the value back to 0. This happens for me for that video even for direct assignments independent of your code, e.g. document.querySelector(“video”).currentTime=4. I have never had this problem with my own projects and would therefore like to understand why.

My current guess is that it is due to caching. https://view-transitions.chrome.dev/ always seems to return Cache-Control: max-age=0 (and never a http response of 304).

Is this just me or is the behavior reproducible and is it due to disallowing caching?

bramus commented 1 month ago

Thanks for reaching out, Martin. It’s only just yesterday that the site switched hosts and I noticed this breakage too. The culprit indeed are the Caching headers and I am collaborating with the relevant team to get it fixed.

martrapp commented 1 month ago

Haha, what an extraordinary coincidence! I wish you the best of luck for a quick solution!

And thank you very much for the confirmation!