The Program Service is responsible for:
- Play next program after current program ends.
- Change program when seek outside program boundaries.
- Fetch information of current playing program or asset (VOD)
PROGRAM_CHANGED
or ASSET_CHANGED
events on the player object are fired when the playback starts or when a program boundary has been crossed.
myPlayer.on(empPlayer.Events.PROGRAM_CHANGED, function (event, data) {
data.program // The program object from exposure
});
myPlayer.on(empPlayer.Events.ASSET_CHANGED, function (event, data) {
data.asset // The asset object from exposure
});
Program and asset (VOD) object can be accessed anytime during playback.
myPlayer.getProgramDetails() //return current playing program
myPlayer.getAssetDetails() //return current playing asset
You can go back and forward between programs for a channel.
myPlayer.playNextProgram()
myPlayer.playPreviousProgram(end) //If end is true, it play 30 sec from the end
You can always jump to the live edge when playing a channel.
myPlayer.gotoLive()
The program service can be stopped and restarted.
myPlayer.stopProgramService()
myPlayer.startProgramService()
If program service don't receiving EPG when calling next-program endpoint, it start polling for EPG every 2-3 minutes.
Polling for EPG can be turned off with epgPollingDisabled options.
When playing a channel without EPG is't no meaning to poll for EPG.
options['epgPollingDisabled'] = true; // Default is false