roAudioPlayerEvent

The roAudioPlayer sends the roAudioPlayerEvent with the following predicates that indicate its valid event types:

Supported methods

isListItemSelected() as Boolean

A stream has been selected to start playing.

isStatusMessage() as Boolean

Status information is available.

isFullResult() as Boolean

Audio playback completed at end of content.

isPaused() as Boolean

Audio playback was paused by the user.

isResumed() as Boolean

Audio playback has resumed

isPartialResult() as Boolean

Audio playback was interrupted

isRequestFailed() as Boolean

Audio playback failed due to an error

isTimedMetaData() as Boolean

This event is fired when an ID3 timecode has passed with an event that includes key/value pairs for timed metadata that the Brightscript app is interested in.

All timed metadata is released after it is delivered to the Brightscript app. It is also released without delivery if the Brightscript app did not indicate it’s interest in the data with a SetTimedMetaDataForKeys() call.

isRequestSucceeded() as Boolean

Stream playback has completed successfully.

GetMessage() as String

Returns the string "Timed Metadata"

GetInfo() as Object

Returns an associative array of key/value pairs of timedMetadata at the pts timecode specified in the index.

GetIndex() as Integer

Returns the index of the audio stream.

isFormatDetected() as Boolean

Checks whether an event has been fired when the format of all tracks in the media stream have been identified.

Specific information about the event can be obtained by calling the GetMessages() and GetInfo() methods on the event.

GetMessage() as String

Returns a description of the message (for exampe, "Format Detected").

GetInfo() as Object

Returns information about the video player event. This method returns an roAssociativeArray that contains the following keys:

KeyValue
audioThe format of the audio stream, if any
captionsThe format of the captioning data, if any
videoThe format of the video stream, if any

isSegmentDownloadStarted() as Boolean

Checks whether the individual segments in an HLS or smooth stream are about to be downloaded. This method returns true if segments in the stream are going to be downloaded; otherwise, it returns false.

Specific information about the event can be obtained by calling the GetMessages() and GetInfo() methods on the event.

GetMessage() as String

Returns a description of the message (for example, "Segment download started").

GetInfo() as Object

Returns an associative array containing the following information about the segment download event:

KeyValue
SequenceStream segment sequence number
SegBitrateBitrate of the segment, in kilobits per second
StartTimeTimestamp of the start of the segment data
EndTimeTimestamp of the end of the segment data

isStreamSegmentInfo() as Boolean

Checks whether playback has begun of a segment in an HLS, DASH, or smooth stream. This method returns true if the playback of a segment in an HLS, DASH, or smooth stream has begun; otherwise, it returns false. Specific information about the event can be obtained by calling the GetMessage(), GetIndex() and GetInfo() methods on the event.

GetMessage() as String

Returns a description of the message (for example, "Stream segment info").

GetIndex() as Integer

Returns the segment start time in seconds.

GetInfo() as Object

Returns an associative array with the following information about the stream segment:

Key

Value

StreamBandwidth

Bandwidth of the stream being played in kbps

SegStartTime

Segment start time (offset from start of stream) in milliseconds

Sequence

Stream segment sequence number

SegUrl

Stream segment URL (i.e., .ts file for HLS, stream fragment URL for smooth)

HdrMode

Indicates the HDR format of the content, which may be one of the following values:

  • 0: UNKNOWN
  • 1: NONE (SDR)
  • 2: HDR10
  • 3: DOLBY_VISION
  • 4: HLG10
  • 5: HDR10_PLUS
  • 6: SL_HDR2

isDownloadSegmentInfo() as Boolean

Checks whether a segment in an adaptive stream (HLS, Smooth, or DASH) has been downloaded. This method returns true if a segment in an adaptive stream (HLS, Smooth, or DASH) has been downloaded; otherwise, it returns false. Specific information about the event can be obtained by calling the GetMessage(), GetIndex() and GetInfo() methods on the event.

GetMessage() as String

Returns a description of the message (for example, "Download segment info").

GetIndex() as Integer

Returns the segment sequence number.

GetInfo() as Object

Returns an associative array containing the following information about the segment download:

KeyValue
StatusStatus of the download: 0 = success, nonzero = error
SequenceStream segment sequence number (same as returned by GetIndex)
SegUrlStream segment URL (i.e., .ts file for HLS, stream fragment URL for smooth)
DownloadDurationAmount of time spent downloading the segment, in milliseconds
SegSizeSegment size, in bytes
SegTypeType of data in the segment: 1=audio, 2=video, 3=captions, 0=mux
BitrateBitrate of the segment, in bits per second
SegBitrateBitrate of the segment, in kilobits per second (equal to Bitrate / 1000)