t src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script>
        AFRAME.registerComponent('vidhandler', {
            init: function () {
                this.toggle = false;
                this.vid = document.querySelector("#vid");
                this.vid.pause();
            },
            tick: function () {
                if (this.el.object3D.visible == true) {
                    if (!this.toggle) {
                        this.toggle = true;
      