Jump to content

Automatisch iPad oder iPhone WebUI laden


Frotzamuta

Recommended Posts

Posted

einfach folgende Zeilen in die svcweb/index.html in den <head> bereich kopieren

	<script type="text/javascript">
	if       ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/Android/i))) {
		window.location += "iphone/index.html";
	} else if (navigator.userAgent.match(/iPad/i)) {
		window.location += "ipad/index.html";
	}
</script>

 

RS neu starten und testen.

Bis jetzt ist das ganze nur für iPhone und Android auf iPhone Interface und iPad auf iPad Interface eingerichtet. Da ist sicherlich noch Spielraum nach oben.

 

Die komplette index.html sieht dann so aus:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>DVBViewer Media Server {version} ({host})</title>
   <meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<link rel="shortcut icon" type="image/png" href="recservice.png">
<script type="text/javascript">
	if       ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/Android/i))) {
		window.location += "iphone/index.html";
	} else if (navigator.userAgent.match(/iPad/i)) {
		window.location += "ipad/index.html";
	}
</script>
</head>
<frameset rows='68,*' border='0' >
<frame name='top' scrolling='no' src='top.html' noresize='noresize' frameborder='0'>
   <frame name="main" scrolling='no' noresize src="timeline.html">
<noframes>
	<body>
		<p>Your browser doesn't support Frames!</p>
	</body>
</noframes>
</frameset>
</html>

 

Viel Spaß!

×
×
  • Create New...