1 | <html>
|
---|
2 | <head>
|
---|
3 | <title>py-tcpmultiplexer webcam server - Room 1</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">
|
---|
8 | function 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 |
|
---|
23 | function changeVideo(mjeg_uri)
|
---|
24 | {
|
---|
25 | $("#player").attr("src",mjeg_uri);
|
---|
26 | $("#player").attr("alt","Video Feed: " + mjeg_uri);
|
---|
27 | }
|
---|
28 |
|
---|
29 | function flipImages()
|
---|
30 | {
|
---|
31 | player_uri = $("#mainCam").attr("src");
|
---|
32 | screen_uri = $("#smallCam").attr("src");
|
---|
33 | $("#mainCam").attr("src", screen_uri);
|
---|
34 | $("#smallCam").attr("src", player_uri);
|
---|
35 |
|
---|
36 | }
|
---|
37 |
|
---|
38 | var runningPresentation = false;
|
---|
39 | function changePresentation()
|
---|
40 | {
|
---|
41 | if (runningPresentation) {
|
---|
42 | $("#mainCam").attr("src", '/img/logo.png');
|
---|
43 | $("#smallCam").attr("src", '/img/logo.png');
|
---|
44 | changeAudio('');
|
---|
45 | runningPresentation = false;
|
---|
46 | $("#togglePresentation").attr('value',"Start Presentation");
|
---|
47 | } else {
|
---|
48 | $("#mainCam").attr("src", '/cam6/video');
|
---|
49 | $("#smallCam").attr("src", '/cam7/video');
|
---|
50 | changeAudio('/cam7/audio');
|
---|
51 | runningPresentation = true;
|
---|
52 | $("#togglePresentation").attr('value',"Stop Presentation");
|
---|
53 | }
|
---|
54 | }
|
---|
55 |
|
---|
56 | $(document).ready(function(){
|
---|
57 | if ( $.browser.msie ) {
|
---|
58 | $("#messagebox").html('Live webcam does not support MSIE, please use alternative browser, <a href="http://www.browserchoice.eu">http://www.browserchoice.eu</a>');
|
---|
59 | }
|
---|
60 | });
|
---|
61 |
|
---|
62 | </script>
|
---|
63 |
|
---|
64 | <style type="text/css">
|
---|
65 | #mainCam {
|
---|
66 | position: relative;
|
---|
67 | height: 95%;
|
---|
68 | }
|
---|
69 |
|
---|
70 | #smallCam {
|
---|
71 | position: absolute;
|
---|
72 | right: 0;
|
---|
73 | top: 0;
|
---|
74 | width: 25%;
|
---|
75 | border: 1px solid;
|
---|
76 | background-color: lightgrey;
|
---|
77 | }
|
---|
78 | </style>
|
---|
79 | </head>
|
---|
80 | <body>
|
---|
81 | <div id="messagebox" style="background-color: red"></div>
|
---|
82 | <div>
|
---|
83 | <input type="button" id="togglePresentation" OnClick="changePresentation()" value="Start Presentation" />
|
---|
84 | <input type="button" id="toggleCamera" OnClick="flipImages()" value="Switch Camera's" />
|
---|
85 | </div>
|
---|
86 | <img id="mainCam" src='/img/logo.png' />
|
---|
87 | <img id="smallCam" src='/img/logo.png' />
|
---|
88 | </div>
|
---|
89 |
|
---|
90 | <div id="jplayer"></div>
|
---|
91 | </body>
|
---|
92 | </html>
|
---|