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;
}
}