The src attribute identifies the content source of a media element using a URL, Universal Naming Convention (UNC) path, or absolute path. The source can be any type of digital media content or file as long as there is an enabled data source plug-in that can access the content and a media parser or playlist parser plug-in that can parse the content. In general, any stream that can be assigned as the source of a publishing point is a valid value for the src attribute. By default, you can specify any of the following sources for a media element: a Windows Media file, a JPEG image file, an MP3 audio file, an encoder stream, a stream or file from a remote Windows Media server, a stream or file from a local publishing point, or a playlist file.
The following example uses four types of content sources in one playlist:
<?wsx version='1.0'?> <smil> <media id="VideoFile" src="D:\LocalMedia\Video4.wmv"/> <media id="Playlist" src="Playlist.wsx"/> <media id="LocalPubPoint" src="lpp://pubpoint5"/> <media id="LiveStream" src="http://encoder:1000"/> </smil>
The following table shows examples of valid path syntax for the src attribute.
||References a digital media file on a local or remote server.|
||References a playlist file on a local or remote server.|
||References an encoder stream.|
||References a stream from another publishing point on a local or remote Windows Media server.|
||References a stream from a station or publishing point on a server running Windows 2000 Server with Windows Media Services version 4.1, which requires the HTTP protocol.|
||References a specific digital media file or playlist from a publishing point on a remote Windows Media server. You can specify whether the stream is sent using UDP or TCP by changing the protocol to RTSPU or RTSPT, respectively.|
||References a specific digital media file or playlist from another publishing point on the local Windows Media server.|
||References a Web server page that generates a custom playlist file.|
||References a multicast stream using the multicast information file. Relative URLs cannot be used to specify this path.|
If the publishing point is on a local server, you can use an lpp:// (local publishing point) prefix instead of specifying the server name in the path. Content streamed using the lpp:// prefix is more efficient because it does not use the network transport layer. However, if the specified publishing point has a wrapper playlist enabled, the contents of the wrapper will not be streamed. If you want to include the wrapper content with the publishing point content, you must use the rtsp:// or http:// prefixes instead of lpp://.
The following examples illustrate the use of physical and relative URLs. The media elements illustrate three ways that you can reference Movie1.wmv if the playlist is located at C:\Wmroot\Playlist.wsx:
<media src="c:\wmroot\Movie1.wmv" />
In the previous example, the src attribute uses the physical path of Movie1.wmv.
This example uses a relative URL, substituting the base URL with the path segment of a period (.), which indicates that the content is located on the current directory level. The path segment could also be represented by two periods (..) to indicate that the content is located on the directory level above the current level.
This example specifies the file name only. If the src attribute value is a file name without a path, the absolute base URL is implied, which means that the playlist and the file are in the same location.
The src attribute can be specified for the following playlist element: