Using getUserMedia to let user select microphone. Further I use enumerateDevices to create a select with devices so that user can change device from UI.
I am on Firefox and have not checked how others browsers fare, but at least for FF I have not found a solution.
If user selects to not allow access when asked one do not get to ask again[ 1 ] until user removes the restriction:
Question is if there is a way to detect when user removes the restriction?
Scenario is typically:
- User loads page and are asked to select input device
User rejects
UI disables device selector + hide various stuffUser removes restriction (as per picture above)
UI enables device selector + unhide various stuff
There is (obviously) not a way to reset the block from client side by Java Script, but is there a way to detect that user revokes the block? (Or is there? Sounds like something that could be exploited to keep looping a request for access.)
One could do a loop where one keep trying for the lifetime of the page, but would like to avoid that. Looking for an event for this.
In that regard, ondevicechange, does not trigger an event when block is removed - which is logical in a way as there is not a change in the available devices, in a way :P.
[ 1 ] That is: one can ask, but it result in a:
MediaStreamError
message: The request is not allowed by the user agent or the platform in the current context.
name: NotAllowedError
