Skip to navigation

VideoRenderer (class)

Web SDK v5 API reference
View as Markdown

Stream

Class that represents an audio renderer.

An instance should be created via the RendererManager.createVideoRenderer method

Methods

clear

clear(): void

Stops playing audio and releases all resources.

Returns: void

enablePIPControl

enablePIPControl(enabled: boolean): void

Enables or disables Picture-in-Picture browser native control for the video element.

Picture-in-Picture control is disabled by default.

Since: 5.3.0

Parameters

ParameterTypeRequirementDescription
enabledbooleanRequiredWhether Picture-in-Picture control is allowed

Returns: void

getElement

getElement(): HTMLVideoElement

Returns a HTMLVideoElement object and starts playing video.

Returns: HTMLVideoElement

mirror

mirror(): this

Mirrors the current video element.

Returns: this

setElementClasses

setElementClasses(classes: string[]): this

Updates the collection of the class attributes of the video element with the provided ones.

Parameters

ParameterTypeRequirementDescription
classesstring[]RequiredArray of class attributes

Returns: this

setElementId

setElementId(elementId: string): this

Sets the HTML id attribute to the video element.

Parameters

ParameterTypeRequirementDescription
elementIdstringRequiredId attribute

Returns: this

setStyles

setStyles(styles: PlainStyles): this

Parameters

ParameterTypeRequirementDescription
stylesPlainStylesRequired

Returns: this

updateStream

updateStream(stream: Stream): void

Replaces a stream for the renderer.

Parameters

ParameterTypeRequirementDescription
streamStreamRequiredVideo stream to be rendered

Returns: void

Properties

type

Returns the renderer type (video).