ok the final stage is almost there, but again a question. I did this:
cameraView.addEventListener('play', function () {
cameraImage.src = cameraCanvas.toDataURL("image/webp");
cameraImage.classList.add("taken");
let that = this; // Cache reference to cameraView for the closure
var object_texture_image = runtimeScene.getObjects("VideoPlayerM"); // Get all the objects called "VideoPlayerM" which is a sprite
var object_texture_image_renderer = object_texture_image[0].getRendererObject(); // get the object called "VideoPlayerM" and get this renderer (PIXI sprite)
(function loop() {
if (!that.paused && !that.ended) { // Adapt to your needs
cameraCanvas.getContext("2d").drawImage(that, 0, 0);
object_texture_image_renderer.texture = PIXI.Texture.fromCanvas(cameraView); //here we update the texture I hoped
setTimeout(loop, 1000 / 30); // drawing at 30fps
}
})();
}, 0);
So what works is that the texture is empty now/cleared, but not the camera view. I guess I’m again are asking for the texture when not completed however in this same Loop I render succesfully on the html canvas.