Still time to wish a happy new year!
Displaying a mesh with a video texture read from an external file works perfectly well like in following “official” PG https://playground.babylonjs.com/#ZMCFYA#83 as in
var ANote0VideoVidTex = new BABYLON.VideoTexture("vidtex","textures/babylonjs.mp4", scene);
How would it be possible to save the video content in a local string, say
An then later, recreate the video texture with a call similar to
new BABYLON.VideoTexture("vidtex", myVideoStr, scene) ?
I am afraid everybody knows how to do that but me!
Lot of thanks 4 helping.
I think if you want to save the video in a .json-file you can use serialize(). To recreate the video you should be able to Parse().
I would not recommend to read a big binary into a string. You would probably run out of ram pretty fast.
The problem with fetching the blob URL again is that this will create a full copy of the blob’s data, and so instead of having it only once in memory, you’ll have it twice. With big blobs this can blow your memory usage quite quickly.