Permalink
Browse files

Added support for firefox

  • Loading branch information...
iambrandonn committed Mar 17, 2013
1 parent d7a8cd6 commit 9ce7b65447dafc23801b7f5b2bbf0886ac74821f
Showing with 32 additions and 19 deletions.
  1. +8 −4 demo.js
  2. +10 −9 index.html
  3. +14 −6 webcam-swiper-0.1.js
View
12 demo.js
@@ -14,14 +14,18 @@ window.transformStyle = Modernizr.prefixed('transform').replace(/([A-Z])/g, func
var isMoving = false;
-// Show fail message if browser doesn't support getUserMedia
-if (navigator.getUserMedia === undefined) {
+// Firefox
+if ($.browser.mozilla && +($.browser.version) < 20) {
+ $(".instructions").css("color", "red");
+ $(".instructions").text('In order for this page to work in Firefox version 19 or lower you will need to go to about:config and turn on the media.navigator.enabled flag.');
+}
+else if (navigator.getUserMedia === undefined) {
$(".instructions").css("color", "red");
if (!Modernizr.csstransforms3d) {
- $(".instructions").text("Your browser/hardware doesn't support hardware accelerated 3D CSS. The page may not work well. Your browser also doesn't support getUserMedia(). Try using the latest version of Chrome.");
+ $(".instructions").text("Your browser/hardware doesn't support hardware accelerated 3D CSS. The page may not work well. Your browser also doesn't support getUserMedia(). Try using the latest version of Chrome or Firefox 20+.");
}
else {
- $(".instructions").text("Your browser doesn't support getUserMedia(). Try using the latest version of Chrome.");
+ $(".instructions").text("Your browser doesn't support getUserMedia(). Try using the latest version of Chrome or Firefox 20+.");
}
}
else if (!Modernizr.csstransforms3d) {
Oops, something went wrong.

0 comments on commit 9ce7b65

Please sign in to comment.