Embedded Player interaction API documentation
Adobe Learning Manager provides a library, which can be integrated into an app. This library provides various APIs to listen to events and trigger actions in the embedded player.
Using the APIs provided, you can play, pause, and perform other actions on the player.
Load the library
The library is available at this location.
To load the library, follow the steps below:
- Load the js file in the consumer application.
- On loading the library, window.cpPlayerLib will be populated.
The default values are:
- window.cpPlayerLib.env = https://learningmanager.adobe.com/app/player;
- window.cpPlayerLib.sourceOrigin = “https://cpcontents.adobe.com”;
Methods available
The cpPlayerLib library consists of the following functions:
startPlayer
getAllPlayers
getPlayer
navigateToModule
next
previous
toggleTOC
toggleNotes
toggleClosedCaption
changeLanguage
closePlayer
togglePlayPause
setVolume
setPlayBackSpeed
seek
forward
backward
navigateToPage
nextPage
previousPage
zoomIn
zoomOut
downloadJobAid
toggleJobAidPullout
fullScreen
List of events
onPlayerEvents(callBack)
On registering the callback function will be invoked on all player events. The event names are as follows:
- PLAY (Video/ Audio/ CP)
- PAUSE (Video/ Audio/ CP)
- TIMEUPDATE (Video/ Audio/ CP)
- PAGECHANGE (PPT/ PDF)
- NOTEADDED (All contents)
- LAUNCHED (All contents)
- STARTED (All contents)
- COMPLETED (All contents)
- PASSED (All contents)
- FAILED (All contents)
onStreamingEvents(callBack)
On registering the callback function will be invoked on all player statements that are sent for tracking user activity.