source: py-tcpmultiplexer/htdocs/browser.html

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

New version of UI stuff.

  • Property svn:mime-type set to text/html
File size: 3.4 KB
RevLine 
[315]1<html>
2<head>
[319]3<title>py-tcpmultiplexer Webcam Control </title>
[315]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>
[319]7<script type="text/javascript">
[321]8function changeAudio(wav_uri)
[319]9{
10 $("#jplayer").jPlayer({
11 ready: function () {
[321]12 $(this).jPlayer("stop");
[319]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}
[336]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});
[319]34</script>
[321]35
[315]36</head>
37<body>
[336]38<div id="messagebox" style="background-color: red"></div>
[321]39<div>
[336]40<label for="cam">Webcam:</label>
41<select name="cam">
42 <option value="img/logo.png" checked="checked">None</option>
43 <option value="/cam1/video">RepRap</option>
44 <option value="/cam2/video">RoomA</option>
45 <option value="/cam3/video">Kitchen</option>
46 <option value="/cam4/video">RepRap</option>
47 <option value="/cam5/video">RickCam</option>
48 <option value="/cam6/video">EdCam</option>
49 <option value="/cam7/video">MobileCam</option>
50</select>
51<label for="sound">Audio:</label>
52<select name="sound">
53 <option value="none" checked="checked" >None</option>
54 <option value="/cam1/audio">RepRap</option>
55 <option value="/cam7/audio">MobileCam</option>
56</select>
[315]57
[321]58<script type="text/javascript">
[336]59 $("select[name='cam']").change(function () {
60 changeVideo($("select[name='cam']").val());
[321]61 });
[336]62 $("select[name='sound']").change(function () {
63 changeAudio($("select[name='sound']").val());
[321]64 });
65</script>
66
67<div>
68<img id="player" src="img/logo.png" alt="Video feeds"/><br/>
[315]69</div>
70
[321]71<div id="jplayer" />
[315]72
[319]73
[321]74
[315]75<hr />
[319]76<p>Tested browsers: <a href="http://www.firefox.com">Mozilla Firefox</a>, <a href="http://www.google.com/chrome">Google Chrome</a> (<em>If no video appear below, you are using unsupported browser</em>)<br />
[328]77<small>Source Code at: <a href="http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/">http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/</a> build @ <a href="http://opencommunitycamp.org">#occ2011</a> - feedback/comments at <a href="irc://irc.freenode.net/#occ">#occ</a></small>
[315]78
[325]79<p />
[328]80Example stream creation from Webcam or Buildin Camera:
81<table border="1">
82<tr><td>Linux</td><td>:</td><td><tt>vlc -I http v4l:///dev/video0 --sout='#transcode{vcodec=MJPG}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=0.0.0.0:9000/webcam}}'</tt>
83</td></tr>
84<tr><td>Mac</td><td>:</td><td><tt>/Applications/VLC.app/Contents/MacOS/VLC qtcapture:// --sout='#transcode{vcodec=MJPG,vfilter=canvas{width=640,height=480}}:standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=0.0.0.0:9000/webcam}}'</tt>
85</td></tr>
86<tr><td>Windows</td><td>:</td><td><tt>???</tt></td></tr>
87<tr><td>iPhone</td><td>:</td><td><tt>???</tt></td></tr>
88<tr><td>Android</td><td>:</td><td><tt><a href="https://market.android.com/details?id=com.pas.webcam">IP Webcam</a></tt></td></tr>
89</table>
[325]90
[315]91</body>
92</html>
Note: See TracBrowser for help on using the repository browser.