x3dom / x3dom

X3DOM. A framework for integrating and manipulating X3D scenes as HTML5/DOM elements.
http://x3dom.org
Other
813 stars 271 forks source link

Looping in movieTexture does not cache the video #1269

Open parthranawat opened 1 year ago

parthranawat commented 1 year ago

The video is downloaded for every loop over the network when setting the loop attribute as "true" in the MovieTexture tag. I am unsure why it is not caching the video and if it is a browser/video-specific issue.

Browser- Chrome (Version 112.0.5615.49 (Official Build) (arm64)) OS- MacOS Video- .mp4 file (128mb in size) [LINK]

With Loop image

Without Loop

Screenshot 2023-04-16 at 9 13 22 PM
andreasplesch commented 1 year ago

I tried https://metagrid1.sv.vt.edu/~parthranawat/Nazila_Class_23/ but could not get Scene 2 Day to start to play.

For Scene 1 Day it did not reproduce with loop=true on my system (latest Chrome, Win10).

Did you try to enable cache in devtools ?

I think all what loop=true does is to call video.play() after the video ended. There is no explicit fetching from the network.

Here is a related question:

https://stackoverflow.com/questions/58577132/html-video-loop-re-downloads-video-file

128MB may be too large somehow.

We would need a simple scene which consistently shows the behavior.

image