source: py-tcpmultiplexer/htdocs/browser-embedded.html@ 387

Last change on this file since 387 was 336, checked in by Rick van der Zwet, 13 years ago

New version of UI stuff.

File size: 2.2 KB
RevLine 
[336]1<html>
2<head>
3<title>py-tcpmultiplexer Webcam Control </title>
4<link href="css/style.css" type="text/css" rel="stylesheet"/>
5<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
6<script type="text/javascript" src="js/jquery.jplayer.min.js"></script>
7<script type="text/javascript">
8function changeAudio(wav_uri)
9{
10 $("#jplayer").jPlayer({
11 ready: function () {
12 $(this).jPlayer("stop");
13 $(this).jPlayer("setMedia", { wav: wav_uri }).jPlayer("play");
14 },
15 ended: function (event) {
16 $(this).jPlayer("play");
17 },
18 swfPath: "",
19 supplied: "wav"
20 });
21}
22
23function changeVideo(mjeg_uri)
24{
25 $("#player").attr("src",mjeg_uri);
26 $("#player").attr("alt","Video Feed: " + mjeg_uri);
27}
28
29$(document).ready(function(){
30 if ( $.browser.msie ) {
31 $("#messagebox").html('Live webcam does not support MSIE, please use alternative browser, <a href="http://www.browserchoice.eu">http://www.browserchoice.eu</a>');
32 }
33
34 $("select[name='cam']").change(function () {
35 changeVideo($("select[name='cam']").val());
36 });
37 $("select[name='sound']").change(function () {
38 changeAudio($("select[name='sound']").val());
39 });
40});
41</script>
42
43<style type="text/css">
44#messagebox { background-color: red }
45#container { text-align: center }
46</style>
47
48</head>
49<body>
50<div id="container">
51 <div id="messagebox"></div>
52 <div>
53 <label for="cam">Webcam:</label>
54 <select name="cam">
55 <option value="img/logo.png" checked="checked">None</option>
56 <option value="/cam1/video">RepRap</option>
57 <option value="/cam2/video">RoomA</option>
58 <option value="/cam3/video">Kitchen</option>
59 <option value="/cam4/video">RepRap</option>
60 <option value="/cam5/video">RickCam</option>
61 <option value="/cam6/video">EdCam</option>
62 <option value="/cam7/video">MobileCam</option>
63 </select>
64 <label for="sound">Audio:</label>
65 <select name="sound">
66 <option value="none" checked="checked" >None</option>
67 <option value="/cam1/audio">RepRap</option>
68 <option value="/cam7/audio">MobileCam</option>
69 </select>
70 </div>
71 <div>
72 <img id="player" src="img/logo.png" height="95%" alt="Video feeds"/><br/>
73 <div id="jplayer" />
74 </div>
75</div>
76</body>
77</html>
Note: See TracBrowser for help on using the repository browser.