nexxPLAY
Search…
Playback Control
The SDK also allows to control all Playback Mechanisms of the Player in every Moment. The _play.control.interact Namespace is used for these Functions.
There are two Ways to control a Player Instances Playback:
    it is possible to use the global _play.control.interact.* Method with the Use of a Container-ID Parameter.
    it is possible to call the Method directly on the Player Instance Object (returned by every _play.control.addPlayer* Method)

General Playback

1
_play.control.interact.play(CONTAINER-ID)
Copied!
1
_play.control.interact.pause(CONTAINER-ID,canBeResumed)
Copied!
1
//starts play, if paused and pauses if currently playing.
2
_play.control.interact.toggle(CONTAINER-ID)
Copied!
1
//is identical to play() on an Instance in "paused" State
2
_play.control.interact.resume(CONTAINER-ID)
Copied!
1
//only possible on a Player Instance, that has not been started yet, but is ready to start
2
_play.control.interact.startMuted(CONTAINER-ID)
Copied!
1
_play.control.interact.mute(CONTAINER-ID)
Copied!
1
_play.control.interact.unmute(CONTAINER-ID)
Copied!
1
_play.control.interact.seekTo(CONTAINER-ID,time)
Copied!
1
_play.control.interact.seekBy(CONTAINER-ID,time)
Copied!
1
_play.control.interact.setVolume(CONTAINER-ID,[0.1-1])
Copied!
1
_play.control.interact.setPlaybackSpeed(CONTAINER-ID,[-1:2])
Copied!
1
_play.control.interact.setAudioLanguage(CONTAINER-ID,lang)
Copied!
1
_play.control.interact.showCaptionsForLanguage(CONTAINER-ID,lang)
Copied!
1
_play.control.interact.hideCaptions(CONTAINER-ID)
Copied!

Playback of multiple Items within a Media Container

1
//swap to the next Item in a Container Element (Playlist, Collection, AudioAlbum etc)
2
_play.control.interact.next(CONTAINER-ID)
Copied!
1
//swap to the previous Item in a Container Element (Playlist, Collection, AudioAlbum etc)
2
_play.control.interact.previous(CONTAINER-ID)
Copied!
1
//swap to exactly this Position of the Item List
2
_play.control.interact.swapToPosition(CONTAINER-ID,position)
Copied!

Playback Mode

1
//this Command will fail under most conditions (as Fullscreen Enter needs a User Gesture by Browser Security)
2
_play.control.interact.enterFullscreen(CONTAINER-ID)
Copied!
1
_play.control.interact.exitFullscreen(CONTAINER-ID)
Copied!
1
_play.control.interact.enterPopout(CONTAINER-ID)
Copied!
1
_play.control.interact.exitPopout(CONTAINER-ID,andContinuePlay)
Copied!
1
_play.control.interact.lightsOut(CONTAINER-ID)
Copied!
1
_play.control.interact.lightsOn(CONTAINER-ID)
Copied!

Changing the Media Object

1
_play.control.interact.swapToMediaItem(CONTAINER-ID,MEDIA-ID,STREAMTYPE,startPosition,delay,reason,showReturnButton)
Copied!
1
_play.control.interact.swapToGlobalID(CONTAINER-ID,GLOBAL-ID,startPosition,delay,reason,showReturnButton)
Copied!
1
_play.control.interact.swapToRemoteMedia(CONTAINER-ID,REMOTE-REFERENCE,STREAMTYPE,PROVIDER,delay,reason,showReturnButton)
Copied!

Interacting with connected Files and Downloads

1
//start Downloading a connected File, indicated by its position in the current File List
2
_play.control.interact.startDownloadFile(CONTAINER-ID,position);
Copied!

Interacting with connected Polls

1
//start Downloading a connected File, indicated by its position in the current File List
2
_play.control.interact.startPoll(CONTAINER-ID,POLL-ID);
Copied!
POLL-ID is the valid ID of a Poll. If POLL-ID is omitted, the Player will start the Poll, that has been connected to the current Media (if any).
Last modified 1mo ago