FAQ

AAMP Engine Javascript API References

API
Published: October 10, 2019
Edited: May 21, 2020

Player Events

playbackStateChanged

Payload:   state: number

Description:   fired as state changes across play/pause seek/not-seek quadruplet

playbackProgressUpdate

Payload:   durationMiliseconds: number,
positionMiliseconds: number,
playbackSpeed: number,
startMiliseconds: number,
endMiliseconds: number

Description:   fired based on the interval set

playbackCompleted

Description:   fired when there is nothing left to play

playbackSpeedChanged

Payload:   speed: number,
reason: string

playbackStateChanged

Payload:   shouldRetry: boolean,
code: number,
description: string

Description:   fired when an error occurs

decoderAvailable

Payload:   decoderHandle: number

Description:   fired when video decoder handle becomes available, required for closedcaption parsing + rendering by RDK ClosedCaptions module

mediaMetadata

Payload:   durationMiliseconds: number,
languages: string[],
bitrates: number[],
playbackSpeeds: number[],
width: number,
height: number,
hasDrm: boolean

Description:   fired with metadata of the asset currently played, includes duration(in ms), audio language list, available bitrate list, hasDrm, supported playback speeds

speedsChanged

Payload:   playbackSpeeds: number[]

Description:   fired when supported playback speeds changes (based on iframe availability)

Player States

Player States

Idle

Playing

Paused

Seeking

Player Errors

AAMP_TUNE_INIT_FAILED

Media Error:   10

Error String:   AAMP: init failed

Remarks:   Fragmentcollector initialization failed

AAMP_TUNE_MANIFEST_REQ_FAILED

Media Error:   10

Error String:   AAMP: Manifest Download failed

Remarks:   Playlist refresh failed

AAMP_TUNE_AUTHORISATION_FAILURE

Media Error:   40

Error String:   AAMP: Authorization failure

AAMP_TUNE_FRAGMENT_DOWNLOAD_FAILURE

Media Error:   10

Error String:   AAMP: fragment download failures

AAMP_TUNE_INIT_FRAGMENT_DOWNLOAD_FAILURE

Media Error:   10

Error String:   AAMP: init fragment download failed

AAMP_TUNE_UNTRACKED_DRM_ERROR

Media Error:   50

Error String:   AAMP: DRM error untracked error

AAMP_TUNE_DRM_INIT_FAILED

Media Error:   50

Error String:   AAMP: DRM Initialization Failed

AAMP_TUNE_DRM_DATA_BIND_FAILED

Media Error:   50

Error String:   AAMP: InitData-DRM Binding Failed

AAMP_TUNE_DRM_CHALLENGE_FAILED

Media Error:   50

Error String:   AAMP: DRM License Challenge Generation Failed

AAMP_TUNE_LICENCE_TIMEOUT

Media Error:   50

Error String:   AAMP: DRM License Request Timed out

AAMP_TUNE_LICENCE_REQUEST_FAILED

Media Error:   50

Error String:   AAMP: DRM License Request Failed

AAMP_TUNE_INVALID_DRM_KEY

Media Error:   50

Error String:   AAMP: Invalid Key Error, from DRM

AAMP_TUNE_UNSUPPORTED_STREAM_TYPE

Media Error:   50

Error String:   AAMP: Unsupported Stream Type

Remarks:   Unable to determine stream type for DRM Init

AAMP_TUNE_FAILED_TO_GET_KEYID

Media Error:   50

Error String:   AAMP: Failed to parse key id from PSSH

AAMP_TUNE_FAILED_TO_GET_ACCESS_TOKEN

Media Error:   50

Error String:   AAMP: Failed to get access token from Auth Service

AAMP_TUNE_CORRUPT_DRM_DATA

Media Error:   51

Error String:   AAMP: DRM failure due to Corrupt DRM files

AAMP_TUNE_CORRUPT_DRM_METADATA

Media Error:   50

Error String:   AAMP: DRM failure due to Bad DRMMetadata in stream

AAMP_TUNE_DRM_DECRYPT_FAILED

Media Error:   50

Error String:   AAMP: DRM Decryption Failed for Fragments

AAMP_TUNE_GST_PIPELINE_ERROR

Media Error:   80

Error String:   AAMP: Error from gstreamer pipeline

AAMP_TUNE_PLAYBACK_STALLED

Media Error:   7600

Error String:   AAMP: Playback was stalled due to lack of new fragments

AAMP_TUNE_CONTENT_NOT_FOUND

Media Error:   20

Error String:   AAMP: Resource was not found at the URL(HTTP 404)

AAMP_TUNE_DRM_KEY_UPDATE_FAILED

Media Error:   50

Error String:   AAMP: Failed to process DRM key

AAMP_TUNE_DEVICE_NOT_PROVISIONED

Media Error:   52

Error String:   AAMP: Device not provisioned

AAMP_TUNE_INVALID_MANIFEST_FAILURE

Media Error:   10

Error String:   AAMP: Invalid Manifest, parse failed

AAMP_TUNE_FAILED_PTS_ERROR

Media Error:   80

Error String:   AAMP: Playback failed due to PTS error

AAMP_TUNE_FAILURE_UNKNOWN

Media Error:   100

Error String:   AAMP: Unknown Failure

See Related: AAMP Engine QuickStart

PHP Code Snippets Powered By : XYZScripts.com