The roVideoPlayer sends the roVideoPlayerEvent with the following predicates that indicate its valid event types:

isStreamStarted() as Boolean

The video stream has started playing.

GetIndex() as Integer

Returns the number of seconds from play to start streaming.

GetInfo() as Object

Returns an Associative Array containing these members:

MemberTypeDescription
UrlStringURL of video stream
StreamBitrateIntegeraverage bitrate of stream, in bits per second
MeasuredBitrateIntegermeasured network bandwidth in kibibits per second, used to select stream
IsUnderrunBooleantrue if this is a rebuffer due to an underrun

isPlaybackPosition() as Boolean

The current position in the video stream has changed.  This is sent periodically while playing, as determined by the last call to ifVideoPlayer.SetPositionNotificationPeriod.

GetIndex() as Integer

Returns current position in stream, in seconds from the beginning.

GetInfo() as Object

Available as of firmware version 7.5

MemberTypeDescription
ClipIdxIntegerThe zero starting index of the item in the content list this event is related to
ClipPosIntegerplayer position relative to the start of the clip in milliseconds


isRequestFailed() as Boolean

Video playback has failed.

GetMessage() as String

Returns text description of error.

GetIndex() as Integer

Returns one of the following error IDs:

ValueDescription
0Network error : server down or unresponsive, server is unreachable, network setup problem on the client.
-1HTTP error: malformed headers or HTTP error result.
-2Connection timed out
-3Unknown error
-4Empty list; no streams were specified to play
-5Media error; the media format is unknown or unsupported
-6DRM error

GetInfo() as Object

Returns an AssociativeArray containing the same members as in isStreamStarted except IsUnderrun.

These additional members are available as of firmware version 7.5:

MemberTypeDescription
ClipIdxIntegerThe zero starting index of the item in the content list this event is related to
IgnoredBooleantrue if the error was ignored and the player skipped to the next item in the content list


isStatusMessage() as Boolean

Status information is available.

GetMessage() as String

Returns one of the following strings or other diagnostic message.

"startup progress"
"start of play"
"playback stopped"
"end of stream"
"end of playlist"

isFullResult() as Boolean

Video playback has completed at end of the content list.

isPaused() as Boolean

Video playback was paused by the user.

isResumed() as Boolean

Video playback has resumed.

isFormatDetected() as Boolean

This event is 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 following functions on the event:

GetMessage() as String

Returns a description of the message, i.e., "Format Detected".

GetInfo() as Object

Returns an associative array containing the following information:

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

isSegmentDownloadStarted() as Boolean

This event is fired when each individual segment in an HLS or smooth stream is about to be downloaded.

Specific information about the event can be obtained by calling the following functions on the event:

GetMessage() as String

Returns a description of the message, i.e., "Segment download started".

GetInfo() as Object

Returns an associative array containing the following information:

KeyValue
SequenceStream segment sequence number
SegBitrateBitrate of the segment, in kilobits per second

StartTime

Timestamp of the start of the segment data
EndTimeTimestamp of the end of the segment data

isDownloadSegmentInfo() as Boolean

This event is fired after each individual segment in an adaptive stream (HLS, Smooth, or DASH)  has been downloaded.

Specific information about the event can be obtained by calling the following functions on the event:

GetMessage() as String

Returns a description of the message, i.e., "Download segment info".

GetIndex() as Integer

Returns the segment sequence number.

GetInfo() as Object

Returns an associative array containing the following information:

KeyValue
Status

Status 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)

DownloadDuration

Amount 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)

isStreamSegmentInfo() as Boolean

This event is fired at the beginning of playback of each individual segment in an HLS, DASH, or smooth stream. 

Specific information about the event can be obtained by calling the following functions on the event:

GetMessage() as String

Returns a description of the message, i.e., "Stream segment info".

GetIndex() as Integer

Returns the segment start time in seconds.

GetInfo() as Object

Returns an associative array containing the following information:

KeyValue
StreamBandwidth

Bandwidth of the stream being played in kbps

SequenceStream segment sequence number
SegUrlStream segment URL (i.e., .ts file for HLS, stream fragment URL for smooth)

SegStartTime

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

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 channel is interested in.

All timed metadata is released after it is delivered to the BrightScript channel.

It is also released without delivery if the BrightScript channel did not indicate its interest in the data with a SetTimedMetaDataForKeys() call.

GetMessage() as String

Returns the string "Timed Metadata"

GetIndex() as Integer

Returns the PTS timecode

GetInfo() as Object

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

isCaptionModeChanged() as Boolean

The closed caption mode or track has been changed by the user. Further information on the event can be returned by calling the following functions on the event.

GetIndex() as Integer

Returns index of captions mode:

IndexMode
0Off
1On
2Instant replay

GetInfo() as Object

Always returns invalid.

GetMessage() as String

Returns a caption track name, such as: "eia608/1" ,"eia608/3", and so forth.

isRequestSucceeded() as Boolean

The player has finished playing one item in the content list.

GetIndex() as Integer

Returns the index of the item in the content list that finished playing

isListItemSelected() as Boolean

The player is about to start playing a new item in the content list.

GetIndex() as Integer

Returns the index of the item that is about to start playing


Example

isCaptionModeChanged() Event Example
Function showVideoScreen(episode As Object) 
  port = CreateObject("roMessagePort") 
  screen = CreateObject("roVideoScreen") 
  'some video stream 
  '... 
  'etc... 
  episode.SubtitleConfig : { 
    TrackName : "eia608/1" 
    } 
  screen.SetContent(episode) 
  screen.SetMessagePort(port) 
  screen.Show() 
  while true 
    msg = wait(0, port) 
    if type(msg) = "roVideoScreenEvent" then 
      if msg.isCaptionModeChanged() 
        print "Caption Mode Changed" 
        print "Caption Mode: "; msg.GetIndex() 
        print "Caption track: "; msg.GetMessage() 
      end if 
    end if 
  end while 
End Function