Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Buttons disabled #23

Open
MajesticKhan opened this issue Aug 30, 2020 · 2 comments
Open

Buttons disabled #23

MajesticKhan opened this issue Aug 30, 2020 · 2 comments

Comments

@MajesticKhan
Copy link

Hi are the buttons suppose to be disabled?

image

@harikt
Copy link

harikt commented Oct 27, 2020

I also came across this error.

First started with : https://webrtc.org/getting-started/firebase-rtc-codelab . It also have similar error. So switched to solution branch and tried.

The screenshot below is using solution branch.

Looking into the console there is some more information.

Screenshot from 2020-10-27 12-23-48

Note : Camera, Microphone etc is already attached. Tested on Firefox ( 81.0.2 (64-bit) ) and Chrome ( Version 85.0.4183.121 (Official Build) (64-bit) )

@meldaravaniel
Copy link

@harikt @MajesticKhan It's not clear from the actual tutorial, but you have to click the "Open camera and microphone" button before it enables the create/join room buttons. This is how the code is designed as well. If you look at index.html, you'll notice the create/join rooms start out as disabled. In app.js, the init method adds a click eventListener on all the buttons, notably the #cameraButton to call openUserMedia(...) when someone clicks the open camera button. Within openUserMedia it gets camera/mic feed, and then:

document.querySelector('#cameraBtn').disabled = true;
  document.querySelector('#joinBtn').disabled = false;
  document.querySelector('#createBtn').disabled = false;
  document.querySelector('#hangupBtn').disabled = false;

to enable the other buttons.

I think it's working as intended.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants