For the next step please check our Storm JavaScript Library - API Methods where you’ll learn about available API methods.
Events are related to the video/playback behavior.
Event name | Additional data | Description | Can be fired more than once? |
---|---|---|---|
playbackRequest | streamKey:string | Indicates that a request for a stream playback has been created. | yes (once per video) |
playbackInitiate | no | Fired whenever a playback of a stream is successfully requested from a Storm Streaming Server/Cloud instance. | yes (once per video) |
playbackStart | no | Notifies that video playback has started (video is now playing). | yes |
playbackPause | no | Notifies that video playback has been paused (due to end-user or system interaction). | yes |
playbackProgress | playbackStarTime:number, playbackDuration:number, streamStartTime:number, streamDuration:number, dvrCacheSize:number | Informs on video progress, stream/playback start-time, stream/playback duration and nDVR cache size. | yes |
playbackStateChange | state: PlaybackState | Informs on video playback state change. | yes |
streamStateChange | state: StreamState | Notifies that stream state has changed (stream state always refers to the original stream on a server). | yes |
streamStop | no | Called when the stream is closed on the server side (usually it means that the broadcaster has stopped streaming, or stream was unpublished). | yes |
streamNotFound | no | Called whenever a stream with a specific name was not found on the server (this includes hibernated streams or sub-streams). | yes (once per video) |
streamMetadataUpdate | metadata: StreamMetadata | Informs of metadata arrival for current video. MetaData contains information about stream codecs, width, height, bitrate, etc. | yes |
bufferingStart | no | Indicates that video content is being readied for playback. The video buffer must fill in order for the video to start. | yes |
bufferingComplete | no | Indicates that the buffer is full and playback is about to start. | yes |
volumeChange | volume:number, muted:boolean, invokedBy:user | browser | Notifies that video volume was changed (either its value was changed, or video was muted/un-muted). | yes |
playbackError | no | Indicates that there was a problem with the playback (it usually means that the browser was not able to play a source material due to malformed bitcode). | yes (once per video) |
fullScreenEnter | no | Fired whenever a library instance enters browser fullscreen mode (either native or overlay type). | yes |
fullScreenExit | no | Fired whenever a library instance exits fullscreen mode (either native or overlay type). | yes |
qualityListUpdate | qualityList:QualityItem[] | Fired whenever a list of available qualities (substreams) is updated. | yes |
sourceDowngrade | bandwidthCap:number | Fired when the video source is downgraded due to bandwidth limitations. | yes |
Value | Description |
---|---|
INITIALIZED | Component has been initialized. |
PLAYING | Stream is playing. |
BUFFERING | Stream is buffering. |
PAUSED | Stream was paused by user or a browser. |
STOPPED | Stream has been stopped. |
UNKNOWN | Unknown state. |
Value | Description |
---|---|
NOT_INITIALIZED | Stream has not been initialized. |
INITIALIZED | Stream has been initialized. |
NOT_FOUND | Stream has not been found. |
AWAITING | Stream exists, but there is no data yet. |
NOT_PUBLISHED | Stream exists, but hasn't been published. |
PUBLISHED | Stream exists and it's published (can stream). |
UNPUBLISHED | Stream exists, but has been unublished. |
STOPPED | Stream existed, but has been stopped (server-side). |
CLOSED | Stream existed, but has been removed (server-side). |
UNKNOWN | Stream status is unknown (there is no connection a the server). |
ERROR | Error while retrieving stream status. |
Field | Return Value | Description |
---|---|---|
videoWidth | number | Width of the video frame in pixels. |
videoHeight | number | Height of the video frame in pixels. |
videoTimeScale | number | Time unit for video timestamps, typically expressed in Hz. |
constantFrameRate | boolean | Indicates whether the video stream has a constant frame rate (true) or variable frame rate (false). |
videoDataRate | number | Bit rate of the video stream expressed in bits per second (bps). |
frameRate | number | Number of frames per second in the video stream. |
encoder | string | Name of the software or hardware encoder used to encode the video stream. |
videoCodec | string | Codec used for video compression (e.g., H.264, H.265, VP9). |
audioCodec | string | Codec used for audio compression (e.g., AAC, MP3, Opus). |
audioChannels | number | Number of audio channels in the stream (e.g., 2 for stereo, 6 for 5.1 surround). |
audioSampleRate | number | Audio sampling rate expressed in Hz (e.g., 44100, 48000). |
audioSampleSize | number | Bit depth of audio samples (e.g., 16, 24, 32). |
audioDataRate | number | Bit rate of the audio stream expressed in bits per second (bps). |
Field | Return Value | Description |
---|---|---|
id | number | Returns the quality item ID, which can later be used to activate this particular quality. |
label | string | Returns the quality label, which consists of the vertical resolution and "p", e.g., "1080p". |
monogram | string | Returns the monogram for this quality based on its resolution, e.g., "LQ", "SD", "HD", "FH", "2K", "4K". |
isAuto | boolean | Returns true if this quality item is of the auto type. |
Create a free ticket and our support team will provide you necessary assistance.