Home Identifier Source
public class | source

ImageSource

You can directly use instance of this class. imageSource

Extends:

src/sources/mediasource~MediaSource → ImageSource

Constructor Summary

Public Constructor
public

constructor(properties: Object, gl: WebGLContext)

Image playback source.

Member Summary

Public Members
public

element: *

public

height: *

public
public

width: *

Method Summary

Public Methods
public

load()

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

pause()

Pause the ImageSource if it is playing.
public

play()

Set the ImageSource playing.
public

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

public

seek(seekTime: number)

Seek to playlist time and do something appropriate with this ImageSource.

Public Constructors

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

Image playback source. Inherits from MediaSource

A ImageSource is the manifestation of a mediaSourceReference from a playlist object which has type "image".

A ImageSource exists for a period slightly before a ImageSource is to play in order to give it time to preload and is destroyed as soon as the ImageSource has finished playing.

Params:

NameTypeAttributeDescription
properties Object

An object with the following attributes: id, duration, start, 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 width: * source

Public Methods

public load() source

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

public pause() source

Pause the ImageSource if it is playing.

public play() source

Set the ImageSource playing.

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

Params:

NameTypeAttributeDescription
program *
renderParameters *
textures *

public seek(seekTime: number) source

Seek to playlist time and do something appropriate with this ImageSource. This has little effect on the image as it's static but can affect any effect shaders applied to this image and any MediaSourceListeners listening to the Id of this source.

Params:

NameTypeAttributeDescription
seekTime number

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