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

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

Instance Properties

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

Access Media Data of the Instance

1
//will return an Object of Metadata Information of the currently played Media Object of the nexxPLAY Instance under the given Container.
2
_play.control.getMediaData(CONTAINER-ID)
Copied!
1
//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.
2
_play.control.getCurrentTime(CONTAINER-ID)
Copied!
1
//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.
2
_play.control.getCaptionData(CONTAINER-ID, onlyLanguage)
Copied!
1
//will return an Array of available Captions Langauges of the current Media Object of the Player Container – null, if none is available.
2
_play.control.getCaptionLanguages(CONTAINER-ID)
Copied!
1
//will return an Array of available Audio Languages of the current Media Object.
2
_play.control.getAudioLanguages(CONTAINER-ID)
Copied!
1
//will return an Array of available Files, connected to the current Media Object
2
_play.control.getConnectedFiles(CONTAINER-ID)
Copied!
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.
1
//enable Debug Output on Production Players
2
_play.config.enableDebug(filter);
Copied!
1
//explicitely set a different Language, than the Page/the User uses
2
_play.config.setLanguage(lang);
Copied!
1
//manually set a Platform/Gateway String. This will influence the Player Behaviour and must be handled very carefully.
2
_play.config.setPlatform(platform);
Copied!
1
//manually set a Delivery Partner Details. All Media Events will then report this Partner as Delivery Partner.
2
//this is handled by nexxPLAY automatically normally.
3
_play.config.setDeliveryPartner(ID, hash, adRef);
Copied!
1
//manually set a Affiliate Partner ID. All Media Events will then report this Partner as Delivery Partner.
2
//this is handled by nexxPLAY automatically normally.
3
_play.config.setAffiliatePartner(ID);
Copied!
1
//mark the current Page Context as Context Reference. This will be included in all Media Events for detailed Analysis Purposes.
2
_play.config.setContextReference(ref);
Copied!
1
//manually set a Session Identifier. This should never be used, unless advised by 3Q nexx.
2
_play.config.setCid(ID);
Copied!
1
//force the Player to use/not use SSL on the current Page (or App)
2
_play.config.setSSL(true/false);
Copied!
1
//controls a Page with multiple, independant Players. If set to true, the SDK will pause all other Players, if a new Player starts Playback
2
_play.config.setAllowOnlyOnePlayerPlaing(true/false)
Copied!
1
//manually override the PopOut Functionality of nexxPLAY. This should not be modified, if the User explicitley denied the Usage of PopOut Players
2
_play.config.setUserAllowsPopout(bool)
Copied!
1
//if the Page needs User Informations (for the Comment Addon for example), but will not use the nexxOMNIA User Management
2
_play.config.setExternalUser(externalRef, name, email, thumb);
Copied!

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:
1
//manually set a ConsentString for Ad Requests
2
_play.config.setUserConsentString(cs)
Copied!
1
//define a boolean Version of Consent Management by explicitely forbid Tracking
2
_play.config.setUserIsTrackingOptOuted()
Copied!
Please compare this with the general Description of GDPR and TCF 2.0 here:
Last modified 1mo ago