Windows apps
Collapse the table of content
Expand the table of content


banner art


The src attribute specifies the URL for a media element.


src = String-value


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 http://
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.


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">
    <media id="media_1" src=".\movie_1.wmv" />
    <media id="media_2" src="c:\movies\playlist_2.wsx" />

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">
    <media id="media_1" src=".\movie_2.wmv" />

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
References a digital media file on a local or remote server.
References a playlist file on a local or remote server.
http://encoder_name:port_number References a stream from an encoder.
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.
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.
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

© 2018 Microsoft