範例:
<OBJECT id="VIDEO" width="320" height="240" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<OBJECT id="VIDEO" width="320" height="240" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">
<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>
Most important parameters supported by Windows Media Player 7 and later:
obj = document.getElementById("VIDEO");
Code | Parameters | Description |
---|---|---|
obj.Settings.autoStart | true | Specifies or retrieves a value indicating whether the current media item begins playing automatically. |
obj.Settings.baseURL | Specifies the base URL used for relative path resolution with URL script commands that are embedded in media items. | |
ClosedCaption.captioningID | 0 | Specifies the name of the element displaying the captioning. |
obj.Controls.currentMarker | 0 | Specifies the current marker number. |
obj.Controls.currentPosition | 0 | Specifies the current position in the media item in seconds. |
obj.Settings.defaultFrame | - | Specifies the name of the frame used to display a URL. |
obj.enableContextMenu | true | Specifies a value indicating whether to enable the context menu, which appears when the right mouse button is clicked. |
obj.enabled | false | Specifies whether the Windows Media Player control is enabled. |
obj.fullScreen | false | Specifies whether video content is played back in full-screen mode. |
obj.Settings.invokeURLs | true | Specifies a value indicating whether URL events should launch a Web browser. |
obj.Settings.mute | false | Specifies if audio is muted. |
obj.Settings.PlayCount | 1 | Specifies the number of times a media item will play. Minimum value of one. |
obj.Settings.rate | 1.0 | Specifies the playback rate. 0.5 equates to half the normal playback speed, 2 equates to twice. |
obj.stretchToFit | false | Specifies whether video displayed by the control automatically sizes to fit the video window, when the video window is larger than the dimensions of the video image. |
obj.uiMode | full | Specifies which controls are shown in the user interface. Possible values: invisible, none, mini, full. |
obj.URL | - | Specifies the name of the media item to play. You can specify a local filename or a URL. |
obj.Settings.volume | Last setting | Zero specifies no volume and 100 specifies full volume. |
obj.Settings.balance | false | Set balance between left and right speakers. 0 is egual, -100 is full left and 100 is full right. |
obj.windowlessVideo | false | Specifies or retrieves a value indicating whether the Windows Media Player control renders video in windowless mode. When windowlessVideo is set to true, the Player control renders video directly in the client area, so you can apply special effects or layer the video with text. Supported by Windows Media Player for Windows XP or later. |
沒有留言:
張貼留言