The APSMediaEvents class defines the events that the Veeso player emits.
In order to receive events, implement the
APSMediaPlayerTrackingEventListener interface,
and register the listener with the Veeso Player.
Example:
A. In your class:
public class FullscreenActivity extends FragmentActivity implements APSMediaPlayerTrackingEventListener {
.
.
.
@Override
public void onTrackingEventReceived(MediaEventType type,
ArrayList urls, String description) {
if(type == APSMediaEvents.MediaEventType.FULLSCREEN)
Toast.makeText(FullscreenActivity.this, "Fullscreen entered", Toast.LENGTH_SHORT).show();
else if(type == APSMediaEvents.MediaEventType.EXIT_FULLSCREEN)
Toast.makeText(FullscreenActivity.this, "Fullscreen exited", Toast.LENGTH_SHORT).show();
}
B. When initializing the player (or any time you wish to start receiving events):
APSMediaPlayer.getInstance().addTrackingEventListener(this);
C. When you no longer want to receive events:
APSMediaPlayer.getInstance().removeTrackingEventListener(this);