Video Events - Storm Android Library

Video events are related to the video behaviors (not the player itself).

Event name Parameters Description
onVideoProgress(VideoProgress videoProgress) videoProgress – object containing both current stream and source time data. Invoked in regular intervals, provides data on current stream time. Details on VideoProgress object were described here.
onVideoConnecting() - Invoked when the library initializes a connection with a Storm Streaming Server instance.
onVideoMetaData(VideoMetaData videoMetaData) videoMetaData – metadata from a video. Invoked when the library receives video metadata from the stream.
onVideoConnectionError(Exception exception) Exception – an exception that caused the error. Invoked when Storm Android Library encounters an error.
onVideoNotFound() - Invoked when no stream with a given name was found on a Storm Streaming Server instance.
onVideoPlay() - Invoked when the stream starts the playback.
onVideoPause() - Invoked when the stream playback is paused.
onVideoStop() - This event will be called when the stream is closed on a server side (usually it means that the broadcaster has stopped streaming).
onVideoSeek(long streamSeekUnixTime) streamSeekUnixTime – current position on the timeline of the stream Invoked when the current timeline position is changed (e.g. user seeks for a different moment of the stream).
Table 1. Library video events table.

VideoProgress object

Parameters name Description
streamDuration Informs on current viewer's stream duration (in seconds). This parameter is calculated as a difference between the moment viewer initiated stream and current stream position (playback).
sourceDuration Informs on source stream duration (in seconds). This parameter is calculated as a difference between the moment the stream was published and current (live) position.
sourceStartTime Exact time (timestamp) when source stream was started (published to the server).
streamStartTime Exact time (timestamp) when current viewer's stream was started.
dvrCacheSize Number of milliseconds of the source stream that is cached (and can be viewed via seek feature).
Table 2. VideoProgress parameters table.
Next Step

In the next step you'll learn more about available API methods in API Methods guide.

Support Needed?

Create a free ticket and our support team will provide you necessary assistance.

On this page

Video Events

Next Step