src

banner art

Previous Next

src

The src attribute specifies the URL for a media element.

Syntax

  src = String-value

Remarks

The WMS SMIL Playlist Parser plug-in enforces case sensitivity on the src attribute.

In most cases, you must add a URL prefix to the string to indicate what data source plug-in the server must use to read the content. The following table identifies the supported URL prefixes.

Data source plug-in URL prefix Description
WMS File Data Source file:// Enables a Windows Media server to read from playlist and media files stored on a FAT, FAT32, NTFS, or CIFS file system.
WMS HTTP Download Data Source httpd:// Enables a Windows Media server to download playlists from a Web server ASP page.
WMS Network Data Source https://
rtsp://
rtspt://
rtspu://
Enables a Windows Media server to pull a distribution stream from an upstream server or encoder.
WMS Push Data Source push: Enables push distribution from an encoder to a Windows Media server.

If you do not include a prefix when specifying the URL, the server attempts to use the WMS File Data Source plug-in to read the content. Therefore, the following two URLs are equivalent.

    file://c:\wmpub\wmroot\movie.wmv
    c:\wmpub\wmroot\movie.wmv

The following example illustrates how to retrieve the URL Prefix and URL Suffix properties for the first data source plug-in in the collection.

    ' Create a WMSServer object.
    Dim Server As WMSServer
    Set Server = New WMSServer

    ' Retrieve the URL prefix and suffix.
    Dim Value As String
    Value = Server.DataSources(0).Properties("URL Prefix")
    Value = Server.DataSources(0).Properties("URL Suffix")

Physical and relative URLs may be used to reference content. A physical URL identifies the actual location of the content by specifying a complete path such as c:\wmpub\wmroot\movie.wmv.

A relative URL requires a base that the server can use to create a physical URL. The base URL for a playlist is either the publishing point path or the URL used to retrieve the playlist. For example, if a client requests the following playlist from an on-demand publishing point in which the IWMSPublishingPoint.Path (Visual Basic .NET) property references c:\wmpub\wmroot, the server resolves the relative URL for media_1 to the physical URL c:\wmpub\wmroot\movie1.wmv.

<?wsx version="1.0">
<smil>
    <media id="media_1" src=".\movie_1.wmv" />
    <media id="media_2" src="c:\movies\playlist_2.wsx" />
</smil>

The base URL for media elements in playlist_2.wsx is c:\movies\playlist_2.wsx. Therefore, if playlist2.wsx contains the following syntax, the server resolves the relative URL for media_3 to c:\movies\movie_2.wmv. The server strips playlist_2.wsx from the base URL when it creates the physical URL.

<?wsx version="1.0">
<smil>
    <media id="media_1" src=".\movie_2.wmv" />
</smil>

Within a relative URL, the path segment "." indicates the current hierarchy level and ".." indicates the level above that. The following table illustrates how the server resolves relative URLs for a base URL of c:\wmpub\wmroot\video\movies.

Relative URL Physical URL
.\movie_1.wmv file://c:\wmpub\wmroot\video\movies\movie_1.wmv
movie_1.wmv file://c:\wmpub\wmroot\video\movies\movie_1.wmv
\movie_1.wmv file://c:\movie_1.wmv
..\movie_1.wmv file://c:\wmpub\wmroot\video\movie_1.wmv

The following table identifies the URL syntax supported by a Windows Media server.

Syntax Description
file://C:\wmpub\wmroot\movie.wmv,
file://\\server\movies\movie.wmv
References a digital media file on a local or remote server.
file://C:\wmpub\wmroot\playlist.wsx,
file://\\server\movies\playlist.wsx
References a playlist file on a local or remote server.
https://encoder_name:port_number References a stream from an encoder.
rtsp://server/pubpoint,
https://server/pubpoint
References a publishing point on a local or remote server. A broadcast publishing point can use an on-demand publishing point as a source, and the reverse is also true.
https://server/station_name,
https://server1/pubpoint
References a publishing point on a Windows Media server version 4.1. HTTP protocol must be used when the source is a V4.1 server.
rtsp://server/pubpoint/movie.wmv References a specific digital media file from a remote server. You can specify whether the stream is sent using UDP or TCP by changing the protocol to RTSPU or RTSPT, respectively.
lpp://pubpoint1/movie1.wmv References a specific digital media file on the local server. Use lpp (local publishing point) to identify the local server when the server name is not specified. Using lpp:// is more efficient because it does not use the network transport layer.
httpd://Server/Playlist.asp,
httpd://server1/playlist.wsx
References an Active Server Page (ASP) or playlist on a Web server.
MCast://c:\wmpub\wmroot\file.nsc References a multicast stream using a multicast information (.nsc) file. Relative URLs cannot be used to specify this path.

See Also

Previous Next