14

I'm using getUseMedia function in my app. Every time I open Firefox permission popup appears. There is no always allow option.

enter image description here

According to the Bugzilla the feature is already implemented at Firefox 30 - current version is 43.

I'm using getUserMedia like this:

    navigator.getUserMedia = (navigator.getUserMedia ||
    navigator.webkitGetUserMedia ||
    navigator.mozGetUserMedia ||
    navigator.msGetUserMedia);

Is it right? Why I can't select allow always option?

ironsand
  • 14,329
  • 17
  • 83
  • 176
  • Somewhat related, [Navigator.getUserMedia()](https://developer.mozilla.org/en/docs/Web/API/Navigator/getUserMedia) is deprecated. Use [MediaDevices.getUserMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) – GAntoine Dec 31 '15 at 23:22
  • I added `mediaDevices.getUserMedia` as second option like `navigator.getUserMedia || mediaDevices.getUserMedia || navigator.webkitGetUserMedia ||`, but then the browser returns `No web audio support in this browser!` error. How can I use the function? – ironsand Jan 01 '16 at 18:51
  • Can't help you there, you're gonna have to wait for someone else to drop by. – GAntoine Jan 01 '16 at 22:41
  • 2
    in chrome, only pages served under HTTPS are allowed to persist that perm, not sure about FF, but it might be the same deal... localhost uses HTTP (no "S") – dandavis Jan 05 '16 at 05:36
  • @dandavis Thanks, I configured to use https by following post, then I could choose `allow always` option! http://stackoverflow.com/a/22878130/1536527 – ironsand Jan 05 '16 at 07:38

1 Answers1

5

As you seem to have discovered, Firefox, like Chrome purposefully disallows this functionality without HTTPS.

Mozilla's tests are a great source for answers around desired behavior, in this case: "'Always Allow' ignored and not shown on http pages"

Thai Wood
  • 505
  • 4
  • 13