Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:00:37+00:00 2026-06-17T13:00:37+00:00

I’ve been building a demo using getUserMedia() in Javascript to get the devices webcam

  • 0

I’ve been building a demo using getUserMedia() in Javascript to get the devices webcam and draw the video stream to a html5 canvas. For browsers that don’t support getUserMedia() I’m defaulting back to a Flash version of the demo.

Now this all works fine in Chrome and Opera and almost in Firefox 18. However Firefox still has a problem – in the config file media.navigator.enabled is still set to false by default. This means that the user cannot make the choice whether to enable the camera or not and my script just waits for an answer that will never come.

Now obviously I cannot change or set this preference in the config file and I wouldn’t want to. However is there anyway of getting the value of this flag so that i can just run a check before proceeding as in “if(media.navigator.enabled)…” ?

Otherwise I will have to always use Flash for Firefox, which would be a little bit of a shame.

The demo is here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:00:38+00:00Added an answer on June 17, 2026 at 1:00 pm

    The media.navigator.enabled preference isn’t something that is supposed to be switched on by the user. It’s rather set to false because this feature is not mature enough in Firefox 18, it’s included for testing only so far. The good news: it will be enabled by default in Firefox 20. Firefox 20 is supposed to be released on March 2nd and a few days later you can already assume that this feature is supported by Firefox (only a negligible number of Firefox users stay on old versions).

    The bad news: I don’t think that you can handle older Firefox versions in a nice way. They also have the navigator.mozGetUserMedia() method but it simply doesn’t do anything. You can choose between having a timeout (e.g. if neither the success nor the error callback were called within a minute switch to the Flash fallback) or user agent sniffing. The latter is ugly but probably the better solution for you:

    var match = /\brv:([\d\.]+)/.exec(navigator.userAgent);
    if (match && parseFloat(match[1]) < 20)
      alert("getUserMedia() not supported");
    

    Note that I explicitly sniff the Gecko version and not the Firefox version – there are more Gecko-based browsers out there, not just Firefox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I am using JSon response to parse title,date content and thumbnail images and place
I have a small JavaScript validation script that validates inputs based on Regex. I
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.