VideoComponentConfig class

Warning: This API is now obsolete.

Creating a layout using component configurations is deprecated. Instead use MediaSourceManager.createVideoPlayerSource() to create a video media source and use that to create a video component.

Options to populate a layout element with a video component

Signature:

export declare class VideoComponentConfig extends ComponentConfig 

Extends: ComponentConfig

Constructors

ConstructorModifiersDescription
(constructor)()Constructs a new instance of the VideoComponentConfig class

Properties

PropertyModifiersTypeDescription
loopbooleanLoop the video when playback completes and play it again indefinitely. (Default: false)
progressBarVisiblebooleanControls the visibility of the video playback progress bar. (Default: false)
scaleModeVideoScaleModeControl how the video will scale to fill the layout element. (Default: ScaleAndCrop)
titlestringDisplay a title for the video.
urlstringPreload a video at the given url before returning the component. This can be an absolute URL of a video, or a relative path to a static video delivered with your module (relative to your index.html)

VideoComponentConfig.(constructor)

Constructs a new instance of the VideoComponentConfig class

Signature:

constructor();

VideoComponentConfig.loop property

Loop the video when playback completes and play it again indefinitely. (Default: false)

Signature:

loop: boolean;

Remarks

With this enabled the promise returned by VideoComponent.playVideo() will never complete, unless another call stops or destroys the video.

VideoComponentConfig.progressBarVisible property

Warning: This API is now obsolete.

This is ignored in new app and SDK versions. You can call VideoComponent.getTimeUpdates() to get the current progress of the video playback and use it to display a progress bar in HTML.

Controls the visibility of the video playback progress bar. (Default: false)

Signature:

progressBarVisible: boolean;

VideoComponentConfig.scaleMode property

Control how the video will scale to fill the layout element. (Default: ScaleAndCrop)

Signature:

scaleMode: VideoScaleMode;

VideoComponentConfig.title property

Warning: This API is now obsolete.

This is ignored in new app and SDK versions. You can display a title using HTML instead.

Display a title for the video.

Signature:

title: string;

VideoComponentConfig.url property

Preload a video at the given url before returning the component. This can be an absolute URL of a video, or a relative path to a static video delivered with your module (relative to your index.html)

Signature:

url: string;

Remarks

If this is not supplied you can preload your video later using VideoComponent.prepareVideo() on the returned object.