nexxPLAY
Search…
Player Management
Besides the already mentioned addPlayer method, the _play.control Namespace offers various Methods to control all current Instance (i.e. Players), controlled by nexxPLAY. The most obvious Method of this Scenario, the various "addPlayer*" Methods have already been discussed.

Instance Management

//verify, that the SDK is ready to use
_play.control.sdkIsReady()
//get an Array of all Container Elements, that currently hold a nexxPLAY Instance.
_play.control.getInstances()
//check, if there are any active nexxPLAY Instances on the current Page.
_play.control.hasActiveInstances()
//will pause all Instances (except the exceptContainer).
//if canBeResumed is set to true, the Players can be resumed.
_play.control.pauseAll(exceptContainer, canBeResumed)
//will continue all Instances (except the exceptContainer), if they have been paused (and are allowed to continue).
_play.control.continueAll(exceptContainer)
//will remove the Player Instance from the current Container to a new Container
_play.control.moveToContainer(CONTAINER-ID,TARGET-CONTAINER-ID)
//will update a Configuration, defined by Player Configuration
_play.control.updateConfiguration(CONTAINER-ID,SETTING-KEY,UPDATED-VALUE)
The updateConfig Method does not support all Configuration Keys. Supported are primarily Settings for Ad URLs ad well as sharingDataand aspectRatio.
//will remove the nexxPLAY Instance from the given Container.
//it stopCasting is set to true and the Player is currently casting, the Casting will be stopped too
_play.control.removePlayer(CONTAINER-ID,stopCasting)

Instance Properties

//verify,if the given Container contains a nexxPLAY Instance
_play.control.instanceExists(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is ready for Control
_play.control.instanceIsReady(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is currently playing
_play.control.instanceIsPlaying(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is currently playing an AD
_play.control.instanceIsPlayingAd(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is currently in PopOut Mode
_play.control.instanceIsInPopOut(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is currently in PiP Mode
_play.control.instanceIsInPiP(CONTAINER-ID)
//check, if the nexxPLAY Instance under the given Container is currently actively connected to a Chromecast
_play.control.instanceIsCasting(CONTAINER-ID)

Access Media Data of the Instance

//will return an Object of Metadata Information of the currently played Media Object of the nexxPLAY Instance under the given Container.
_play.control.getCurrentMedia(CONTAINER-ID)
//will return an Object of Metadata Information of the parent Item of the currently played Media Object.
//if there is no parent Item, null will be returned.
_play.control.getCurrentMediaParent(CONTAINER-ID)
//will return an Object of the detail Playback State of the nexxPLAY Instance under the given Container.
_play.control.getCurrentPlaybackState(CONTAINER-ID)
//will return a Float, representing the current Play Position (in Seconds) of the currently played Media Object of the nexxPLAY Instance under the given Container.
_play.control.getCurrentTime(CONTAINER-ID)
//will return an Object of available Captions (optionally reduced to those, matching the given Language) of the currently played Media Object of the nexxPLAY Instance under the given Container, if available.
_play.control.getCaptions(CONTAINER-ID, onlyLanguage)
//will return an Array of available Audio Languages of the current Media Object.
_play.control.getAudioTracks(CONTAINER-ID)
//will return an Array of available Files, connected to the current Media Object
_play.control.getConnectedFiles(CONTAINER-ID)
The Parameter CONTAINER-ID in all previous Examples can be skipped (or replaced by null), if only one Player is active. If the Parameter is omitted, nexxPLAY will automatically choose the first existing Player Instance.

SDK Settings

The following SDK Methods are rarely needed. They are mentioned for special Cases and should only be used, if advised by 3Q nexx.
//enable Debug Output on Production Players
_play.config.enableDebug(filter);
//explicitely set a different Language, than the Page/the User uses
_play.config.setLanguage(lang);
//manually set a Platform/Gateway String. This will influence the Player Behaviour and must be handled very carefully.
_play.config.setPlatform(platform);
//manually set a Delivery Partner Details. All Media Events will then report this Partner as Delivery Partner.
//this is handled by nexxPLAY automatically normally.
_play.config.setDeliveryPartner(ID, hash, adRef);
//manually set a Affiliate Partner ID. All Media Events will then report this Partner as Delivery Partner.
//this is handled by nexxPLAY automatically normally.
_play.config.setAffiliatePartner(ID);
//mark the current Page Context as Context Reference. This will be included in all Media Events for detailed Analysis Purposes.
_play.config.setContextReference(ref);
//manually set a Session Identifier. This should never be used, unless advised by 3Q nexx.
_play.config.setCid(ID);
//force the Player to use/not use SSL on the current Page (or App)
_play.config.setSSL(true/false);
//controls a Page with multiple, independant Players. If set to true, the SDK will pause all other Players, if a new Player starts Playback
_play.config.setAllowOnlyOnePlayerPlaing(true/false)
//manually override the PopOut Functionality of nexxPLAY. This should not be modified, if the User explicitley denied the Usage of PopOut Players
_play.config.setUserAllowsPopout(bool)
//if the Page needs User Informations (for the Comment Addon for example), but will not use the nexxOMNIA User Management
_play.config.setExternalUser(externalRef, name, email, thumb);

User Preferences, GDPR and Consent Management

In any TCF 2.0 compliant Frontends, nothing has to be done manually, if the Player needs ConsentStrings for Ad Requests. It is fully handled by the Player itself.
For manual Purposes though, Consent Management can be applied by calling the following Functionalities:
//manually set a ConsentString for Ad Requests
_play.config.setUserConsentString(cs)
//define a boolean Version of Consent Management by explicitely forbid Tracking
_play.config.setUserIsTrackingOptOuted()
Please compare this with the general Description of GDPR and TCF 2.0 here: