Skip to content

Commit

Permalink
separated video into asset
Browse files Browse the repository at this point in the history
ytphi committed Oct 18, 2021
1 parent f4134fb commit 0bb7ac4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -10,16 +10,19 @@
init: function () {
this.toggle = false;
document.querySelector("#vid").pause(); //reference to the video
console.log("pausing");
},
tick: function () {
if (document.querySelector("a-marker").object3D.visible == true) {
if (!this.toggle) {
this.toggle = true;
document.querySelector("#vid").play();
console.log("playing");
}
} else {
this.toggle = false;
document.querySelector("#vid").pause();
console.log("pausing");
}
},
});
@@ -33,6 +36,9 @@
embedded
arjs="sourceType: webcam; debugUIEnabled: false; trackingMethod: best;"
>
<a-assets>
<video id="vid" src="./test.mp4" preload="auto" loop autoplay></video>
</a-assets>
<a-marker
type="pattern"
url="./xREAL-Marker.patt"
@@ -50,7 +56,7 @@
id="vid"
loop="true"
vidhandler
src="./test.mp4"
src="#vid"
width="28.5"
height="19"
position="0 0 -1"

0 comments on commit 0bb7ac4

Please sign in to comment.