I have a rails app with JS and am using TokBox api for peer to peer video conferencing. When a user first signs into the video conferencing they are prompted by the web browser by the following prompt
"COULD NOT ADD IMAGE DUE TO REPUTATION" - The first prompt is at the top of the browser and says "example.com wants to use your camera and microphone allow--deny"
That only happens the first time they visit the site. They are then prompted by the next allow request. This second allow request happens every connection while the first prompt is only for the first connection.
"COULD NOT ADD IMAGE DUE TO REPUTATION" - The second prompt is at the space where the users own video will be viewed and says "camera nad micrphone access, example.com is requesting to access your camera and microphone. If you click allow, you may be recorded"
How can I tell if the user allows or declines either of the prompts? I would like to walk my user through the prompts but am having trouble identifying if they click allow or decline and am having trouble knowing if the first prompt is triggered or not (unless I just track their site visits).
Thanks!
PS any help with reputation would be much appreciated, the pictures make the question much clearer.
You can add event listeners to Publisher object to listen to accessAllowed/Denied events that will be fired when the user clicks on allow or deny: http://tokbox.com/opentok/libraries/client/js/reference/Publisher.html#events