TIMEMediaPlayerEvents is a dispinterface that enables a media player to generate events for use within HTML+TIME. These events are used in HTML+TIME Web pages for handshaking and to account for latencies and asynchronous tasks in the player.
The HTML+TIME media element (video or audio) implements the TIMEMediaPlayerEvents methods. The media player in the HTML+TIME Web page signals events to the HTML+TIME media elements. In the following HTML+TIME code, t:VIDEO defines the media element and GUID_PLAYER defines the GUID of the media player.
<t:VIDEO STYLE="behavior:url(#DEFAULT#TIME)" t:BEGIN="5" t:SRC="http://example.microsoft.com/vidfile1.avi" t:PLAYER="GUID_PLAYER" />
The media player signals events to the Web page by using TIMEMediaPlayerEvents methods accessed through the HTML+TIME media element's IDispatch interface. The TIMEMediaPlayerEvents methods are assigned DISPIDs (dispatch identifiers), and each is associated with an HTML+TIME event. To signal an event, the player sends the appropriate DISPID to the media element by calling the IDispatch::Invoke or DispInvoke method on the media element's IDispatch interface. For more information, see Accessing an Object Through the IDispatch Interface in the COM and ActiveX Object Services section of the Platform SDK.
TIMEMediaPlayerEvent Methods
onbegin
Description Generates an event when the media begins playing. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONBEGIN HTML+TIME Event onbegin onend
Description Generates an event when the media stops playing. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONEND HTML+TIME Event onend onmedialoadfailed
Description Generates an event if the media source fails to load. This can be caused by an invalid path or a corrupt file. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIALOADFAILED HTML+TIME Event onmedialoadfailed onmediaready
Description Generates an event when the media source is ready to play. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIAREADY HTML+TIME Event onmediacomplete onmediaslip
Description Generates an event when the connection to the media source is lost or dropped. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONMEDIASLIP HTML+TIME Event onmediaslip onpause
Description Generates an event when the player pauses. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONPAUSE HTML+TIME Event onpause onresume
Description Generates an event when the player resumes playing after a pause. DISPID DISPID_TIMEMEDIAPLAYEREVENTS_ONRESUME HTML+TIME Event onresume