Skip to content

Commit

Permalink
Fix what I bugged out
Browse files Browse the repository at this point in the history
  • Loading branch information
epicminer256 committed Aug 8, 2024
1 parent c3f8f15 commit e67ba2a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ video.muted = true;

document.body.appendChild(video)


window.introtext = new IntroText();
window.videoSettings = new videoProperties();
window.mShortcuts = new mouseShortcuts(video);
window.cap2vid = new capturecard2Video(video, videoSettings)
Expand Down
27 changes: 15 additions & 12 deletions introtext.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
class IntroText{
contructor(){
self.introText = document.createElement('p');
self.introText.classList.add("centerscreen")
self.introText.id = "introText"
self.introText.textContent = "Hover the left side to open menu"
document.body.appendChild(introText)
constructor(){
this.introText = document.createElement('p');
this.introText.classList.add("centerscreen")
this.introText.id = "introText"
this.introText.textContent = "Hover the left side to open menu"

document.body.appendChild(this.introText)

document.body.addEventListener("mousedown", removeIntro, true)
document.body.addEventListener("keydown", removeIntro, true)
setTimeout(self.removeIntro, 5000)
// Thanks Javascript, I have to mention what "this" means with whatever this means
this.removeIntro = this.removeIntro.bind(this)

document.body.addEventListener("mousedown", this.removeIntro, true)
document.body.addEventListener("keydown", this.removeIntro, true)
setTimeout(this.removeIntro, 5000)
}

removeIntro(){
self.introText.remove()
document.body.removeEventListener("mousedown", removeIntro, false);
document.body.removeEventListener("keydown", removeIntro, false);
this.introText.remove()
document.body.removeEventListener("mousedown", this.removeIntro, false);
document.body.removeEventListener("keydown", this.removeIntro, false);
}
}
12 changes: 7 additions & 5 deletions sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ class capturecard2VideoSidebar{

this.helpElement = document.createElement('button');
this.helpElement.onclick = this.openHelp;
this.helpElement.textContent = "Help (?)";
this.helpElement.textContent = "Binds (?)";
this.videobottomother.appendChild(this.helpElement)

this.refreshElement = document.createElement('button');

this.pipElement = document.createElement('button');
this.pipElement.onclick = this.cap2vid.video.requestPictureInPicture;
this.pipElement.textContent = "Picture in Picture (p)"
this.videobottomother.appendChild(this.pipElement);
if(this.cap2vid.video.requestPictureInPicture){
this.pipElement = document.createElement('button');
this.pipElement.onclick = this.cap2vid.video.requestPictureInPicture;
this.pipElement.textContent = "Picture in Picture (p)"
this.videobottomother.appendChild(this.pipElement);
}

this.refreshElement.onclick = this.getDevices;

Expand Down

0 comments on commit e67ba2a

Please sign in to comment.