Embed the Windows Media Station control in an HTML
page.
Use the Microsoft® Visual Basic® Scripting Edition
(VBScript) programming language to invoke the Connect
method exposed by the Windows Media Station
control to access the server that is running Windows
Media Services.
Create a Windows Media station.
Create a stream.
Assign the stream to the station.
To run this sample
In the Server name box, type the name of the
server that is running Windows Media Services, and then
click the Connect button. The connection status appears beside Status. The Stations box
lists any existing stations, as well as the multicast IP
address and port on the connected server.
Server name:
Action:
Status:
Stations:
(Optional) In the Station box, type the station
index number representing existing stations (0 for
the first station, 1 for the second, and so forth,
and -1 for all), and click the Close button
to close any stations you specified.
Station:
Action:
In the Station name box, type the name of the
station you choose. This name must be unique.
Station name:
In the Access right list, click the appropriate
access right.
Access right:
In the IP address box, type the unique multicast
IP address. The recommended IP address is between
224.0.0.0 and 224.255.255.255.
IP address:
In the Port number box, type the port value. The
recommended port value is between 32000 and 65000.
Port number:
In the Delivery mode list, click the appropriate
delivery mode for configuring the station to multicast
content to clients, to distribute content to other
servers, or both.
Delivery mode:
In Format file box, type the name of the format
file with full path.
Format file:
In Format type list, click the appropriate format
type (for example, C:\ASFRoot\Welcome1.asf is of the
.asf type).
Format type:
After you have completed steps 3 through 9, click the Create
station button.
Action:
Manually create a publicly shared folder in which you put the
.nsc file. In the NSF
file path box, type the file name of the nsc type,
with the full path for exporting the station and storing
it on a public share. Then click the Publish
station button. Any previously existing streams on
this station appear in the Existing streams box.
NSF file path:
Action:
Existing streams:
(Optional) In the Stream box, enter the stream
index representing existing stream(s) on the station (0
for the first stream, 1 for the second, and so
forth, and -1 for all), and then click the Close
streams button to close the stream(s) you specify.
Stream:
Action:
(Optional) In the Alias box, type the alias
representing a stream that exists on the station, and
then click the Get stream button to retrieve it.
The status of the stream appears beside Status.
Alias:
Action:
Status:
In the Alias box, enter the alias; in the Source URL
box, type the source URL of the stream, and then click
the Create stream button to create a stream.
The status of the stream appears beside Status.
Alias:
Source URL:
Action:
Status:
Click the Activate stream button to assign the
stream to the station. The status of the stream appears
beside Status.
Action:
Status:
Click the Start stream button to start the
multicast. A message indicates the status of the action.
Action:
Click the Stop stream button to stop a multicast
stream. A message indicates the status of the action.
Action:
To test this new multicast station, open the stream in
Windows Media Player. Enter the path to the station
file (for example, \\localhost\ NSCfiles\myStation1.nsc, where localhost is the name of the server that is
broadcasting the stream created in step 14).
Note The source code is available by
right-clicking the sample page.