Skip to content

Commit

Permalink
Added mute button back
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicminer256 committed Dec 18, 2023
1 parent 267755b commit de39b5e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ class capturecard2VideoSidebar{
this.cap2vid = capturecard2Video;

this.videobottom = document.createElement('div');

this.muteButton = document.createElement('button');
this.muteButton.textContent = 'Unmute (m)';
this.muteButton.onclick = this.toggleMute.bind(this);
this.videobottom.appendChild(this.muteButton);

this.widthElement = document.createElement('input');
this.widthElement.onchange = (object) => {
Expand Down Expand Up @@ -132,9 +137,9 @@ class capturecard2VideoSidebar{
toggleMute(){
this.cap2vid.video.muted = !this.cap2vid.video.muted
if(video.muted == true){
document.getElementById('mute').textContent = "Unmute (m)"
this.muteButton.textContent = "Unmute (m)"
}else{
document.getElementById('mute').textContent = "Mute (m)"
this.muteButton.textContent = "Mute (m)"
}
}
refreshDevices(){
Expand Down Expand Up @@ -253,15 +258,13 @@ class mouseShortcuts{
document.body.addEventListener('mousedown', this.clicked.bind(this));
}
singleClick(){
console.log('s')
if (document.pointerLockElement === document.body) {
document.exitPointerLock()
}else{
document.body.requestPointerLock()
}
}
doubleClick(){
console.log('d')
if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement) {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
Expand Down

0 comments on commit de39b5e

Please sign in to comment.