Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
skayl88 committed Nov 18, 2021
1 parent eeca4b5 commit 09d30cc
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,50 +27,5 @@ require('./socketController')(io)
httpsServer.listen(port, () => {
console.log(`listening on port ${port}`)
})
const webcamButton = document.getElementById('webcamButton');
const webcamVideo = document.getElementById('webcamVideo');

const video = document.getElementById('video');
const mode_btn = document.getElementById('btn_mod');

const local_default = document.querySelector(".local");
const local_360 = document.querySelector(".local_360");
const remote_default = document.querySelector(".remoute_video");


mode_btn.onclick = () => {
mod = !mod;
console.log(mod);
if (mod) {
local_default.style.display = "none";
remote_default.style.display = "none";
local_360.style.display = "block";
local_360.querySelector('video').style.display = "block";
}
else {
local_default.style.display = "block";
remote_default.style.display = "block";
local_360.style.display = "none";
}
}
AFRAME.registerComponent('play-video', {
schema: {
target: { type: 'selector' },
src: { type: 'string' },
on: { default: 'click' },
},

multiple: true,

init: function () {
var data = this.data;

this.el.addEventListener(data.on, function () {
data.target.setAttribute('src', data.src);
data.target.components.material.material.map.image.play();
});
}
});



0 comments on commit 09d30cc

Please sign in to comment.