Firefox can't access camera until constraints are set to false or frame rate is set to 30

How do we conditionally set the value to 30 if firefox and 15 if chrome. Any help is appreciated!