In This Topic
Description
Receive messages regarding the Player's operations.
Syntax
| Visual Basic |
|---|
Public Event OnPlayerEvent( _
ByVal As String, _
ByVal As VHX_EVENTS, _
ByVal As VHX_MEDIA_TYPE, _
ByVal As VHX_STATE, _
ByVal As Double, _
ByVal As Double, _
ByVal As Single, _
ByVal As Single, _
ByVal As Single _
)
|
Parameters
- EventName
- The name of the event.
- EventCode
| Value | Description |
| VHX_MediaDiscovererEnded | |
| VHX_MediaDiscovererStarted | |
| VHX_MediaDurationChanged | |
| VHX_MediaFreed | |
| VHX_MediaListItemAdded | |
| VHX_MediaListItemDeleted | |
| VHX_MediaListPlayerNextItemSet | |
| VHX_MediaListPlayerPlayed | |
| VHX_MediaListPlayerStopped | |
| VHX_MediaListViewItemAdded | |
| VHX_MediaListViewItemDeleted | |
| VHX_MediaListViewWillAddItem | |
| VHX_MediaListViewWillDeleteItem | |
| VHX_MediaListWillAddItem | |
| VHX_MediaListWillDeleteItem | |
| VHX_MediaMetaChanged | |
| VHX_MediaParsedChanged | |
| VHX_MediaPlayerBackward | |
| VHX_MediaPlayerBuffering | |
| VHX_MediaPlayerEncounteredError | |
| VHX_MediaPlayerEndReached | |
| VHX_MediaPlayerForward | |
| VHX_MediaPlayerLengthChanged | |
| VHX_MediaPlayerMediaChanged | |
| VHX_MediaPlayerNothingSpecial | |
| VHX_MediaPlayerOpening | The Player is opening. |
| VHX_MediaPlayerPausableChanged | |
| VHX_MediaPlayerPaused | The Player has paused. |
| VHX_MediaPlayerPlaying | The Playe is palying. |
| VHX_MediaPlayerPositionChanged | |
| VHX_MediaPlayerScrambledChanged | |
| VHX_MediaPlayerSeekableChanged | |
| VHX_MediaPlayerSnapshotTaken | |
| VHX_MediaPlayerStopped | The Player has stopped. |
| VHX_MediaPlayerTimeChanged | |
| VHX_MediaPlayerTitleChanged | |
| VHX_MediaPlayerVout | |
| VHX_MediaStateChanged | |
| VHX_MediaSubItemAdded | |
| VHX_MediaSubItemTreeAdded | |
| VHX_VlmMediaAdded | |
| VHX_VlmMediaChanged | |
| VHX_VlmMediaInstanceStarted | |
| VHX_VlmMediaInstanceStatusEnd | |
| VHX_VlmMediaInstanceStatusError | |
| VHX_VlmMediaInstanceStatusInit | |
| VHX_VlmMediaInstanceStatusOpening | |
| VHX_VlmMediaInstanceStatusPause | |
| VHX_VlmMediaInstanceStatusPlaying | |
| VHX_VlmMediaInstanceStopped | |
| VHX_VlmMediaRemoved | |
- MediaType
| Value | Description |
| VHX_Media_Directory | |
| VHX_Media_Disc | |
| VHX_Media_File | |
| VHX_Media_Playlist | |
| VHX_Media_Stream | |
| VHX_Media_Unknown | |
- State
| Value | Description |
| VHX_State_Buffering | The media being buffered. |
| VHX_State_Ended | The media has reached its end. |
| VHX_State_Error | An error has occured. |
| VHX_State_NothingSpecial | Nothing has started happening yet (initial state). |
| VHX_State_Opening | The media is opening. |
| VHX_State_Paused | The media is paused. |
| VHX_State_Playing | The media is playing. |
| VHX_State_Stopped | The media is stopped. |
- DurationSec
- The duration of the media in seconds.
- CurrentTimeSec
- The current point in the media's duration in seconds.
- CurrentPosition
- The point in the media's lifetime that is currenty playing.
- Rate
- The rate of the media.
- FPS
- The Frames Per Seconds of the media.
Example
private void Form1_Load(object sender, EventArgs e)
{
axVHX1.MediaDebugMessages = true;
}
private void axVHX1_OnPlayerEvent(object sender, AxVHXLib.IVHXEvents_OnPlayerEventEvent e)
{
Debug.WriteLine("OnPlayerEvent");
Debug.WriteLine("eventName: " + e.eventName);
Debug.WriteLine("eventCode: " + e.eventCode);
Debug.WriteLine("mediaType: " + e.mediaType);
Debug.WriteLine("state: " + e.state);
Debug.WriteLine("durationSec: " + e.durationSec);
Debug.WriteLine("currentTimeSec: " + e.currentTimeSec);
Debug.WriteLine("currentPosition: " + e.currentPosition);
Debug.WriteLine("rate: " + e.rate);
Debug.WriteLine("fPS: " + e.fPS);
Debug.WriteLine("----------");
}
See Also