| MediaTrackingEvents Class |
A. In your class:
public sealed partial class HubPage : Page , MediaPlayerTrackingEventHandler {
public void onTrackingEventReceived(object sender , MediaPlayerEventArgs Event) {
System.Diagnostics.Debug.WriteLine("Event = Type: " + Event.Type + " Message: " + Event.Message );
if (Event.Type == MediaTrackingEvents.MediaEventType.FULLSCREEN)
System.Diagnostics.Debug.WriteLine("Fullscreen entered");
else if (Event.Type == MediaTrackingEvents.MediaEventType.EXIT_FULLSCREEN)
System.Diagnostics.Debug.WriteLine("Fullscreen exited");
}
B. When initializing the player (or any time you wish to start receiving events):
MediaPlayer.getInstance().addTrackingEventHandler(this.onTrackingEventReceived);
or
MediaPlayer.getInstance().PlayerEvent += onTrackingEventReceived;
C. When you no longer want to receive events:
MediaPlayer.getInstance().removeTrackingEventHandler(this.onTrackingEventReceived);
or
MediaPlayer.getInstance().PlayerEvent -= onTrackingEventReceived;
Namespace: Veeplay.media
The MediaTrackingEvents type exposes the following members.
| Name | Description | |
|---|---|---|
| MediaTrackingEvents | Initializes a new instance of the MediaTrackingEvents class |
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |