This represents a Video file.

Constructor

new()

Create a new media object instance.

Variables

Methods

getCurrentPos():Int

Return the media position, in milliseconds. Deprecated.

getLength():Int

Return the media length, in milliseconds.

getVolume():Float

Return the media volume, between 0 and 1.

height():Int

The height of the video file in pixels.

isFinished():Bool

If the media has finished or not.

pause():Void

Pause the media element.

@:value({ loop : false })play(loop:Bool = false):Void

Play / resume the media element.

Parameters:

loop

If playing it looped, default = false.

setVolume(volume:Float):Void

Set the media volume, between 0 and 1.

Parameters:

volume

The new volume, between 0 and 1.

stop():Void

Pause the stop element.

unload():Void

Unload the resource from memory.

update(dt:Float):Void

Call this every frame to update the video. This is not required on all targets but where it's not required the function just does nothing - so please call it.

width():Int

The width of the video file in pixels.