From 0bb7ac4492bce0f0f63d1e189e605dbe670f0c9d Mon Sep 17 00:00:00 2001 From: yutongLiu <61435573+yutong5376@users.noreply.github.com> Date: Mon, 18 Oct 2021 11:39:39 -0700 Subject: [PATCH] separated video into asset --- index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 87d1d51..376067a 100644 --- a/index.html +++ b/index.html @@ -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;" > + + +