Changeset 319 for py-tcpmultiplexer


Ignore:
Timestamp:
Jul 19, 2011, 3:42:39 PM (13 years ago)
Author:
Rick van der Zwet
Message:

Browser controls multiple camera's
Default img is static, else it will not stop loading this picture.

Location:
py-tcpmultiplexer/htdocs
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • py-tcpmultiplexer/htdocs/browser.html

    r315 r319  
    11<html>
    22<head>
    3 <title>Python Webcam Control </title>
     3<title>py-tcpmultiplexer Webcam Control </title>
    44<link href="css/style.css" type="text/css" rel="stylesheet"/>
    55<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
    66<script type="text/javascript" src="js/jquery.jplayer.min.js"></script>
    7 <script type="text/javascript" src="js/common.js"></script>
     7<script type="text/javascript">
     8function createAudio(wav_uri)
     9{
     10   $("#jplayer").jPlayer({
     11      ready: function () {
     12         $(this).jPlayer("setMedia", { wav: wav_uri }).jPlayer("play");
     13      },
     14      ended: function (event) {
     15         $(this).jPlayer("play");
     16      },
     17      swfPath: "",
     18      supplied: "wav"
     19    });
     20    $("#jplayer").after($("<p>In-browser audio is running.</p>"));
     21}
     22
     23function changeVideo(mjeg_uri)
     24{
     25   $("#player").attr("src",mjeg_uri);
     26   $("#player").attr("alt","Video Feed: " + mjeg_uri);
     27}
     28</script>
    829</head>
    930<body>
    10 <h1>Android webcam server</h1>
     31<h1>py-tcpmultiplexer webcam server</h1>
    1132
    12 <img src="/cam1/video" alt="Video feed Cam1"/><br/>
     33<input type="button" onclick="changeVideo('/cam1/video')" value="Click to display Cam1" />
     34<input type="button" onclick="changeVideo('/cam2/video')" value="Click to display Cam2" /><br />
     35<img id="player" src="img/logo.png" alt="Video feeds"/><br/>
    1336
    1437<div id="jplayer"><br/><input type="button" onclick="createAudio('/cam1/audio')" value="Click here to play audio with browser"/><br>
     
    1639
    1740
     41
    1842<hr />
    19 <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>)
     43<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 />
     44<small>Source Code at: <a href="http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/">http://rickvanderzwet.nl/svn/personal/py-tcpmultiplexer/</a></small>
    2045
    2146</body>
Note: See TracChangeset for help on using the changeset viewer.