Home Reference Source
public class | source

MediaNode

Extends:

GraphNodeSourceNode → MediaNode

Direct Subclass:

AudioNode, VideoNode

Constructor Summary

Public Constructor
public

Initialise an instance of a MediaNode.

Member Summary

Public Members
public get
public set
public get
public set
public get
public set
Private Members
private
private
private
private
private
private
private
private
private
private
private
private

_state: *

private
private

Method Summary

Public Methods
public
public
Private Methods
private

_load()

private

_seek(time: *)

private
private

_update(currentTime: *, triggerTextureUpdate: boolean): boolean

Inherited Summary

From class GraphNode
public get

Get whether the node has been destroyed or not.

public get

displayName: *: *

Get a string representation of the class name.

public get

Get the names of the inputs to this node.

public get

Get an array of all the nodes which connect to this node.

public get

The maximum number of connections that can be made to this node.

public get

Get an array of all the nodes which this node outputs to.

private
private
private

_gl: *

private
private
private
private
public

connect(targetNode: GraphNode, targetPort: number | String): *

Connect this node to the targetNode

public

Destory this node, removing it from the graph.

public

disconnect(targetNode: GraphNode): *

Disconnect this node from the targetNode.

From class SourceNode
public get

Returns the duration of the node on a timeline.

public get

element: Element: *

Returns the underlying DOM element which represents this source node.

public get
public get

state: *

Returns the state of the node.

public get
public get
public set
private

_callbacks: *[]

private
private
private
private
private
private
private
private
private
private
private

_state: *

private
private
private
public

Clear any timeline state the node currently has, this puts the node in the "waiting" state, as if neither start nor stop had been called.

public

Destroy and clean-up the node.

public

Register callbacks against one of these events: "load", "destroy", "seek", "pause", "play", "ended", "durationchange", "loaded", "error"

public

start(time: number): boolean

Start playback at VideoContext.currentTime plus passed time.

public

Start playback at an absolute time ont the VideoContext's timeline.

public

stop(time: number): boolean

Stop playback at VideoContext.currentTime plus passed time.

public

Stop playback at an absolute time ont the VideoContext's timeline.

public

Remove callback.

private
private

_load()

private

_pause()

private

_play()

private

_seek(time: *)

private

_triggerCallbacks(type: *, data: *)

private
private

_update(currentTime: *, triggerTextureUpdate: boolean): boolean

Public Constructors

public constructor() source

Initialise an instance of a MediaNode. This should not be called directly, but extended by other Node Types which use a HTMLMediaElement.

Override:

SourceNode#constructor

Public Members

public get elementURL: * source

public set playbackRate source

public get playbackRate: * source

public set stretchPaused source

Override:

SourceNode#stretchPaused

public get stretchPaused: * source

Override:

SourceNode#stretchPaused

public set volume source

Private Members

private _attributes: * source

private _element: * source

Override:

SourceNode#_element

private _globalPlaybackRate: * source

private _isElementPlaying: boolean source

private _loopElement: boolean source

private _mediaElementCache: * source

private _playbackRate: number source

private _playbackRateUpdated: boolean source

private _preloadTime: * source

private _ready: boolean source

Override:

SourceNode#_ready

private _sourceOffset: * source

private _state: * source

Override:

SourceNode#_state

private _stopTime: * source

Override:

SourceNode#_stopTime

private _volume: number source

Public Methods

public clearTimelineState() source

Clear any timeline state the node currently has, this puts the node in the "waiting" state, as if neither start nor stop had been called.

Override:

SourceNode#clearTimelineState

public destroy() source

Destroy and clean-up the node.

Override:

SourceNode#destroy

Private Methods

private _load() source

Override:

SourceNode#_load

private _seek(time: *) source

Override:

SourceNode#_seek

Params:

NameTypeAttributeDescription
time *

private _unload() source

Override:

SourceNode#_unload

private _update(currentTime: *, triggerTextureUpdate: boolean): boolean source

Override:

SourceNode#_update

Params:

NameTypeAttributeDescription
currentTime *
triggerTextureUpdate boolean
  • optional
  • default: true

Return:

boolean