nexxPLAY
Search…
Player Events
The nexxPLAY SDK makes heavy Use of various Events. In order to react to them, the Page must add Listeners to those Event Types, it is interested in.

The Playstate Listener

This is the most used Listeners and receives all Events, that are exposed by a nexxPLAY Player Instance.
_play.config.addPlaystateListener(function);
The given Function will then be called for every Player related Event of every Player with a lot of Metadata. The Function will get an Object, that can easily be filtered by object.type to handle only the Events, the Page is interested in.
Please notice, that this Function will receive ALL Events of ALL Players. If that is not desired, dont use a global Listener, add a Player-specific Listener with the _play.PlayerConfiguration.playstateListeners Override.

All available Events

Here is the current List of all emitted Events (that are related to Media Playback):
Event
Description
playeradded
a new Player Instance has been added
startsession
the Player inited (or re-used) a Session
metadata
the Media Item Metadata has been loaded, parsed and verified
playerready
the Player is ready to start Playback
startplayback
the Player is starting Playback (Content or Ad)
startplay
the Player is starting Playback of Content
maininteraction
the User clicked on the Player the first Time
changemedia
the Player swaps to a new Media Item, that is not Part of the current List
changeplaypos
the Player swaps to a new Media Item in the current List
changemediaintent
the Player used virtual Prev/Next Controls, that have been activated (or the Playback has been finished and forcePrevNext is active OR ErrorExit has been disabled and the Player needs a new Media Item). This Event must be answered with a Call to one of the swapMedia Calls.
showoverlay
the Player opens the Overlay UI
hideoverlay
the Player closes the Overlay UI
enterfullscreen
the Player enters Fullscreen
exitfullscreen
the Player exists Fullscreen
enterpip
the Player enters PiP
exitpip
the Player exits PiP
enterpopout
the Player enters PopOut Mode
exitpopout
the Player exits PopOut Mode
enterremote
the Player enters a Remote Display (AirPlay, Chromecast)
Please notice, that on iOS, the Events (Notification) have a different Name, that is built by the following Rule: "nexxPlay" + EventName.camelCase() + "Notification". So for example, a "pause" Notification will become a "nexxPlayPauseNotification", and a "changeplaypos" Notification will become a "nexxPlayChangePlayPosNotification"
Every Event consists of a Data Object besides the Event Name. Accessing the Details varies between Player Technologies, but in General, the Events provide at least basic Information of the Media, that it refers to (EVENT.mediaID, EVENT.globalID, EVENT.streamtype).
These Events are also supported by nexxPLAY for iOS and nexxPLAY for android.

Additional Listener Functions

Although the PlaystateListener is the most used Listener, the nexxPLAY SDK offers a variety of other Listener Functionalities, that can be used in advanced Contexts.
//get notified for Addon Events
_play.config.addAddonListener(function,addonName);
Event
Description
addonrendered
the Player rendered an Addon
addonerror
a Player Addon could not be finished and removes itself
//get notified for Widget Events
_play.config.addWidgetListener(function);
Event
Description
widgetclicked
the Widget has been Clicked
widgeterror
the Widget could not load the Feed
//get notified for LifeCycle Events like "freeze"
_play.config.addLifecycleListener(function);
//get notified for Network Events like "online, offline"
_play.config.addNetworkListener(function);
//get notified for Geo (and Geo Permission) Events
_play.config.addGeoListener(function);