I have created a remix of the Networked A-frame examples project. I've been testing out some features and for some reason, the toggle video button in the bottom left corner of the screen isn't working on the video example.
The function is triggering however it isn't changing the video from on to off and vice versa. I'm not sure why this is, but I'm wondering how I can make it so when the button is clicked, if video is on, it will turn off and if video is off, it will turn on. How can this be done? The code is found in public/examples/index.html at line 106 of this project:
https://glitch.com/edit/#!/modern-talented-tanker?path=examples%2Findex.html%3A116%3A0
Code snippet that isn't working:
// Handle camera button click (Off and On)
cameraBtnEle.addEventListener('click', function() {
NAF.connection.adapter.enableCamera(!cameraEnabled);
cameraEnabled = !cameraEnabled;
cameraBtnEle.textContent = cameraEnabled ? 'Hide Camera' : 'Show Camera';
});
}