Home Identifier Source
public class | source

VideoSource

You can directly use instance of this class. videoSource

Extends:

src/sources/mediasource~MediaSource → VideoSource

Constructor Summary

Public Constructor
public

constructor(properties: Object, gl: WebGLContext)

Video playback source.

Member Summary

Public Members
public

element: *

public

height: *

public
public
public

width: *

Method Summary

Public Methods
public
Clean up the VideoSource for detruction.
public

load()

Set the VideoSource loading, when it's ready isReady() will return true.
public

pause()

Pause the VideoSource if it is playing.
public

play()

Set the VideoSource playing.
public

render(program: *, renderParameters: *, textures: *)

Render the VideoSource to the WebGL context passed into the constructor.
public

seek(seekTime: number)

Seek the VideoSource to an appropriate point for the passed time.

Public Constructors

public constructor(properties: Object, gl: WebGLContext) source

Video playback source. Inherits from MediaSource

A VideoSource is the manifestation of a mediaSourceReference from a playlist object which has type "video".

A VideoSource exists for a period slightly before a VideoSource is to play in order to give it time to preload and is destroyed as soon as the VideoSource has finished playing. You can define an offset into the original video to start playing by passing in a sourceStart value in the properties.

Params:

NameTypeAttributeDescription
properties Object

An object with the following attributes: id, duration, start, sourceStart, and src or element. Where src is the URL of a video, or element is a DOM Video element.

gl WebGLContext

a webGl context to render too.

Public Members

public element: * source

public height: * source

public ready: boolean source

public sourceStart: number source

public width: * source

Public Methods

public destroy() source

Clean up the VideoSource for detruction.

public load() source

Set the VideoSource loading, when it's ready isReady() will return true.

public pause() source

Pause the VideoSource if it is playing.

public play() source

Set the VideoSource playing.

public render(program: *, renderParameters: *, textures: *) source

Render the VideoSource to the WebGL context passed into the constructor.

Params:

NameTypeAttributeDescription
program *
renderParameters *
textures *

public seek(seekTime: number) source

Seek the VideoSource to an appropriate point for the passed time.

Params:

NameTypeAttributeDescription
seekTime number

The time to seek too, this is the overall time for the whole playlist.