Video Streaming Webpage Setup

There are two ways of showing the stream on your webpage:
1) With a media player window in the browser.
2) Link to the stream. The link will open windows media player, and play the stream. Both ways requires that the user has windows media player installed.

TinCam can create a .html file automatically for both options. See Video Streaming Webpage. This page explains how to create the necessary code manually.

WVX file
For both ways you will need to create a .wvx file. The wvx file will ensure that the stream is shown (not downloaded) with all browsers. Call the file stream.wvx and put this code in it:

<ASX version = "3.0">
<Entry>
  <Ref href = "mms://<your ip>:8080" />
</Entry>
</ASX>

You will need to alter the <Ref href... with your ip and port for the stream.

Now you can just link to stream.wvx with a standart link:
<a href="stream.wvx">Video Stream</a>
Or you can use the following code to display the stream in a player window on your webpage.

HTML File
This code will display a mediaplayer window on your webpage:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
<OBJECT ID="MediaPlayer0" WIDTH=320 HEIGHT=285
   CLASSID="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"
   STANDBY="Loading Windows Media Player components..."
   TYPE="application/x-oleobject">

   <PARAM name="autoStart" value="True">
   <PARAM name="filename" value="stream.wvx">

   <EMBED TYPE="application/x-mplayer2"
      SRC="stream.wvx"
      NAME="MediaPlayer0"
      WIDTH=320
      HEIGHT=285>
   </EMBED>
</OBJECT>
You will need to alter some lines in the code to match your settings. Lines 7 and 10 must link to the .wvx file you have created. Lines 12 and 13 can be modified to another size if you wish. The controls in the mediaplayer are 45 pixels high, so you must add 45 pixels to the hight, or the picture will be distorted.



See also: