[329] | 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 | {
|
---|
[336] | 31 | player_uri = $("#mainCam").attr("src");
|
---|
| 32 | screen_uri = $("#smallCam").attr("src");
|
---|
| 33 | $("#mainCam").attr("src", screen_uri);
|
---|
| 34 | $("#smallCam").attr("src", player_uri);
|
---|
[329] | 35 |
|
---|
| 36 | }
|
---|
| 37 |
|
---|
[332] | 38 | var runningPresentation = false;
|
---|
| 39 | function changePresentation()
|
---|
| 40 | {
|
---|
| 41 | if (runningPresentation) {
|
---|
[336] | 42 | $("#mainCam").attr("src", '/img/logo.png');
|
---|
| 43 | $("#smallCam").attr("src", '/img/logo.png');
|
---|
[332] | 44 | changeAudio('');
|
---|
| 45 | runningPresentation = false;
|
---|
| 46 | $("#togglePresentation").attr('value',"Start Presentation");
|
---|
| 47 | } else {
|
---|
[336] | 48 | $("#mainCam").attr("src", '/cam6/video');
|
---|
| 49 | $("#smallCam").attr("src", '/cam7/video');
|
---|
[332] | 50 | changeAudio('/cam7/audio');
|
---|
| 51 | runningPresentation = true;
|
---|
| 52 | $("#togglePresentation").attr('value',"Stop Presentation");
|
---|
| 53 | }
|
---|
| 54 | }
|
---|
[329] | 55 |
|
---|
[336] | 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 |
|
---|
[329] | 62 | </script>
|
---|
| 63 |
|
---|
[336] | 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>
|
---|
[329] | 79 | </head>
|
---|
| 80 | <body>
|
---|
[336] | 81 | <div id="messagebox" style="background-color: red"></div>
|
---|
| 82 | <div>
|
---|
[332] | 83 | <input type="button" id="togglePresentation" OnClick="changePresentation()" value="Start Presentation" />
|
---|
| 84 | <input type="button" id="toggleCamera" OnClick="flipImages()" value="Switch Camera's" />
|
---|
[336] | 85 | </div>
|
---|
| 86 | <img id="mainCam" src='/img/logo.png' />
|
---|
| 87 | <img id="smallCam" src='/img/logo.png' />
|
---|
| 88 | </div>
|
---|
[329] | 89 |
|
---|
[336] | 90 | <div id="jplayer"></div>
|
---|
[329] | 91 | </body>
|
---|
| 92 | </html>
|
---|