Playing video on a plane

Hello people,

I am able to play a video on Plane but unfortunately the autoplay and loop function does not work. How do I make sure that the video starts playing once the page loads and the video should play again once it ends?

Another issue is, I am playing the video on a plane but the video seems to be mirrored, as in flipped. What am I doing wrong in my script?

var ANote0 = BABYLON.MeshBuilder.CreateBox("ANote0", { width: 140, height: 90, depth: 0.100000 }, scene);
            ANote0.position = new BABYLON.Vector3(180, 30, -425);

            var axis = new BABYLON.Vector3(0, 1, 0);
            var angle = Math.PI / 8;
            var quaternion = new BABYLON.Quaternion.RotationAxis(axis, angle);
            ANote0.rotationQuaternion = quaternion;

            var mat = new BABYLON.StandardMaterial("ANote0Mat", scene);
            mat.diffuseColor = new BABYLON.Color4(0, 0, 0, 1);
            ANote0.material = mat;
            var planeOpts = {
                height: 90,
                width: 140,
                sideOrientation: BABYLON.Mesh.BACKSIDE
            };
            var ANote0Video = BABYLON.MeshBuilder.CreatePlane("plane", planeOpts, scene);
            var vidPos = (new BABYLON.Vector3(0, 0, 0.1)).addInPlace(ANote0.position);
            ANote0Video.position = vidPos;

            ANote0Video.rotationQuaternion = quaternion;


            var ANote0VideoMat = new BABYLON.StandardMaterial("m", scene);
            var ANote0VideoVidTex = new BABYLON.VideoTexture("vidtex", "videos/screencast.mp4", scene);
            ANote0VideoMat.diffuseTexture = ANote0VideoVidTex;
            ANote0VideoMat.roughness = 1;
            ANote0VideoMat.emissiveColor = new BABYLON.Color3.White();
            ANote0Video.material = ANote0VideoMat;
            ANote0VideoVidTex.video.play();

            scene.onPointerUp = function () 
            {
                {
                        ANote0VideoVidTex.video.play();

                }
            }

The 5ith parameter of the VideoTexture allows you to invert the picture in the y dimension.

Also, you need an explicit user interaction (generally a click on a button or on the video) to start a video, so autoplay may not work depending on how you get to the page.

The last parameter of the constructor is an optional object (of VideoTextureSettings type with additional settings:

export interface VideoTextureSettings {
    /**
     * Applies `autoplay` to video, if specified
     */
    autoPlay?: boolean;

    /**
     * Applies `loop` to video, if specified
     */
    loop?: boolean;

    /**
     * Automatically updates internal texture from video at every frame in the render loop
     */
    autoUpdateTexture: boolean;

    /**
     * Image src displayed during the video loading or until the user interacts with the video.
     */
    poster?: string;
}