i think having an unexpected getUserMedia behaviour in Safari and i would like to know if i miss something.
In Chrome/Firefox if i dont allow the first getUserMedia({audio: true, video: true})
prompt every next call to it will fail with the error: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
and this seems fine.
However in safari if i dont allow the first getUserMedia call the second one with the same constraints will prompt again, any other constraints will fail with the previous error.
I created a simple reproduction repository here that you can run on each browser to compare (you must refuse the first prompt in order to reproduce the bug). Weirdly the same code works every time on jsfiddle only for safari and keep the same behaviour for other browser (due to the iframe where the code is running i guess)
Here a recording of me reproducing my issue to better understand.
GetUserMedia call order:
// 1: press "Not allow"
getUserMedia({ video: true, audio: true });
// 2: will prompt again (that's the bug) and press "Allow"
getUserMedia({ video: true, audio: true });
// 3: will fail (that's the expected behaviour)
getUserMedia({ video: true, audio: true });
// 3bis: will fail too (that's the expected behaviour)
getUserMedia({ video: {deviceId: {exact: 'aValidDeviceId' }}, audio: {deviceId: {exact: 'aValidDeviceId' }} });
Do i miss something or is this indeed a bug with safari ?
Best regards