Hi
I have had a bunch of virtual tours running for a while now but havent looked at them for a few years but need to sort them out as I am now getting problems. I have them set up like at the bottom so if it detects IOS it will run a completely different version of the tour. If it doesn't it runs the Flash Panorama Player of the tour.
This used to work fine when Android ran Flash properly but now it doesn't on a lot of devices, so would the easiest way be to add a user String so if it detects Android it will run the Krpano version
This will leave it running the FPP version just on desktops which is fine I think - or should I abandon that and just have the KRPano versions running for everything, though I do have a lot of functionality in the fpp tours that still provide a lot of value on desktops so I dont want to give that up unless absolutely necessary.
And what would the detect script be, just to detect generic Android devices.
Script I use to emded the krpano tours also below
I've also noticed if I directly run the krpano versions on my Android phone it doesn't work either, like it's still running flash. Is this bit the problem?
I haven't changed anything since 2015 so I have old versions of tour.js and tour.swf running and have a full license.
Any advice greatly appreciated.
Thanks in advance
--------------------------------------------------------------------------------------------------------
CODE THAT RUNS FPP TOURS, DETECTS IOS AND SWITCHES TO ANTOHER TOUR IF FINDS IT
</script> <style type="text/css">
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
}
</style> <link rel="stylesheet" href="web_site.css">
</head>
<body bgcolor="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
<script language="javascript" type="text/javascript">
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/iPod/i)))
{location.href='ios/tour.html';}
</script>
<div id="flashcontent" align="CENTER">
<p> </p>
<p class="heading_main_bold_italic">This content requires Adobe Flash Player
10 plugin</p>
<p class="heading_main_bold_italic">Please visit <a href="http://www.adobe.com/go/getflashplayer/" target="_blank">adobe.com</a>
and install it</p>
<p class="heading_main_bold_italic">After
installation click <a href="javascript: window.location.reload()">here</a> to continue</p>
</div>
<div id="flashcontent"> </div>
<script type="text/javascript">
var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
so.addParam("allowFullScreen","true");
so.addParam("scale", "noscale");
so.addVariable("xml_file","tour.xml");
so.addParam("allowScriptAccess","sameDomain");
so.addParam ("bgcolor", "#000000");
so.write("flashcontent");
</script>
</body>
</html>
Alles anzeigen
CODE THAT RUNS IOS TOURS
<!DOCTYPE html>
<html>
<head>
<title>krpano.com</title>
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style>
@media only screen and (min-device-width: 800px) { html { overflow:hidden; } }
html { height:100%; }
body { height:100%; overflow: hidden; margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:16px; color:#FFFFFF; background-color:#000000; }
a{ color:#AAAAAA; text-decoration:underline; }
a:hover{ color:#FFFFFF; text-decoration:underline; }
</style>
</head>
<body>
<script src="tour.js"></script>
<div id="pano" style="width:100%; height:100%;">
<noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
<script>
embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano"});
</script>
</div>
</body>
Alles anzeigen