diff --git a/public/js/chat.js b/public/js/chat.js index d060929..c42ff56 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -796,12 +796,22 @@ function togglePictureInPicture() { // function startUp() { + if ( + /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ) + ) { + alert( + "Zipcall is not currently supported on mobile. Please try again on dekstop." + ); + window.location.href = "/notsupported"; + } // Redirect unsupported browsers if (!isWebRTCSupported || browserName === "MSIE") { alert( "Your browser doesn't support Zipcall. Please use Chrome, Firefox, or Safari on laptop/desktop." ); - window.location.href = "/"; + window.location.href = "/notsupported"; } document.title = "Zipcall - " + url.substring(url.lastIndexOf("/") + 1); diff --git a/public/notsupported.html b/public/notsupported.html new file mode 100644 index 0000000..5b87fc1 --- /dev/null +++ b/public/notsupported.html @@ -0,0 +1,147 @@ + + + + + + + Zipcall + + + + + + + + + + + +
+ +
+
+
+
+
+
+
+

+ Your browser is not supported. Please try Chrome, Safari, + or Firefox on a desktop/laptop browser. +

+
+ +
+
+
+
+
+
+ +
+ + + diff --git a/server.js b/server.js index 704d3fe..af357fc 100644 --- a/server.js +++ b/server.js @@ -45,6 +45,10 @@ app.get("/join/*", function (req, res) { } }); +app.get("/notsupported", function (req, res) { + res.sendFile(path.join(public, "notsupported.html")); +}); + app.use(express.static("public")); function logIt(msg, room) {