How to release video texture memory?

I want to update the video address of VideoDome when I click on the GUI, following is my main code:

first, I instance a VideoDome

const vd = new VideoDome(
  "videoDome",
  urls[0],
  {
    resolution: 32,
    clickToPlay: true,
  },
  scene,
)

then, in a gui event, I update the videourl:

vd.videoTexture.updateURL(urls[i])

when run it in my Vr glass, after a few clicks( about six or seven times) on the GUI, the program will crash. Is it caused by my wrong way of using it?

There is no reason for this to break on memory as we still only have one video element and one texture :frowning: Could you create a repro in the playground ?

It just appear in the vr glasses.
But the current babylon version(alpha.63) of playground can not work in vr mode in glasses. I use the alpha.50 in my development.
Later, I will organize the code and send it here or to github. please wait a moment.

oh the same code on Chrome would be ok ? I would suspect it might be an issue with the VR glass browser in this case.

Yes, it work fine on chrome.

the videos file are 8K, 360. I think maybe they are too big.

1 Like