playURL Method

This topic documents a feature that is obsolete as of Windows Internet Explorer 7.

Obsolete. Loads media from a URL into the Media Bar and starts playback.

Syntax

mediaBar.playURL(sURL, sMIME)

Parameters

sURL Required. A String that specifies the URL of the media to play.
sMIME Required. A String that specifies the MIME type of the media to play. Cannot be NULL.

Return Value

No return value.

Remarks

As of Microsoft Internet Explorer 6 on Windows XP Service Pack 2 (SP2) or Internet Explorer 7, the mediaBar feature is obsolete and no longer available.

playURL was introduced in Internet Explorer 6.

You must specify the MIME type for sMIME. If the MIME type specified is invalid but not NULL, the openState property returns 21 ("The player is opening a URL whose type is not known"), while Internet Explorer attempts to determine the media's MIME type. Internet Explorer can handle the media appropriately, even if the MIME type specified in sMIME is incorrect. However, if no MIME type is specified, the Media Bar does not play the media. For more information about MIME types, see MIME Types in IIS.

You must also specify an absolute http, https, or ftp address for the media with sURL. Unlike the HTML page loaded in the media pane, the media player itself cannot serve as a reference point to a particular domain for uplevel or downlevel directories. Therefore, specify an absolute URL in calls to playURL.

If no media is currently playing in the Media Bar, any attempt to access media attribute information with getItemInfo, getAttributeName, or attributeCount returns a script error.

Example

In the following example, a button loaded in the Media Bar content area starts playback of an ASX file.


<INPUT type=button onclick="divMedia.playURL(
'https://msdn.microsoft.com/workshop/samples/author/behaviors/media/mediabar_1.asx',
'video/x-ms-asf');" value='Play the ASX file'/>           
             

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/target_playinfo.htm

Applies To

mediaBar