1

I am working on mediarecorder so I stuck at detecting the mobile browser(for iphone also) so that I can open url forcefully in chrome

var URL = window.location.href;
var RedirectFlag = getUrlVars()["redirectflag"];
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
    if(RedirectFlag=='1')
    {
        function();
    }    
    else
    {
    URL = URL.replace("http://123", "intent://123");
    URL = URL + "&redirectflag=1#Intent;scheme=http;package=com.android.chrome;end";
    window.location.href = URL;
    }
}
freedomn-m
  • 21,261
  • 4
  • 28
  • 53
  • 1
    Does this answer your question? [Detecting a mobile browser](https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser) – freedomn-m Dec 11 '19 at 10:23
  • Are you sure *none* of these 100s (edit: *1000s*) of questions answer your question? https://stackoverflow.com/search?q=detect+mobile+browser – freedomn-m Dec 11 '19 at 10:23
  • This all are about detecting mobile or desktop.I want to detect mobile browser i.e which app the user is using in mobile(chrome,safari,firefox). – Saikiran Jindam Dec 11 '19 at 10:27
  • I'm not sure I understand the distinction. – freedomn-m Dec 11 '19 at 10:32
  • https://www.whatsmyua.info/ might help you and has links to existing libraries (I realise you're not specifically asking for a library, but sometimes easier than reinventing the wheel if it does what you want). – freedomn-m Dec 11 '19 at 10:36
  • i am working on it i will inform you as I solve it and Thanks bro!! – Saikiran Jindam Dec 11 '19 at 12:25
  • all plugins are showing browser name as chromium in all app browsers of mobile. – Saikiran Jindam Dec 13 '19 at 10:03

0 Answers0