[7:14] (extern: com.aussom.aussomscript.AVideo) extends: object
The 'Video' class provides HTML5 video playback support. It wraps an HTMLVideoElement and exposes playback controls, state inspection, and event listeners. Enable the native browser controls with setControls(true), or build custom controls using the playback API.
Video (int Width = 0, int Height = 0)
Creates a Video object. Optional width and height set the element dimensions in pixels (0 means use the browser default).
Width is an optional int for the element width in pixels.Height is an optional int for the element height in pixels.A new Video object._init (int Width = 0, int Height = 0)
setSrc (string Src)
Sets the video source URL.
Src is a string with the URL.this objectgetSrc ()
Gets the current video source URL.
A string with the URL, or an empty string if not set.play ()
Starts or resumes playback.
this objectpause ()
Pauses playback.
this objectstop ()
Stops playback and resets position to the beginning.
this objectgetDuration ()
Gets the total duration of the video in seconds.
A double with the duration, or 0 if unknown.getCurrentTime ()
Gets the current playback position in seconds.
A double with the current time.setCurrentTime (double Time)
Seeks to the given position in seconds.
Time is a double with the playback position in seconds.this objectgetVolume ()
Gets the current playback volume.
A double between 0.0 (silent) and 1.0 (full volume).setVolume (double Volume)
Sets the playback volume.
Volume is a double between 0.0 (silent) and 1.0 (full volume).this objectisMuted ()
Returns whether playback is muted.
A bool, true if muted.setMuted (bool Muted)
Sets the muted state.
Muted is a bool.this objectisLoop ()
Returns whether the video will loop when it reaches the end.
A bool, true if looping is enabled.setLoop (bool Loop)
Sets whether the video loops.
Loop is a bool.this objectisEnded ()
Returns whether playback has ended.
A bool, true if the video has finished playing.isPaused ()
Returns whether playback is currently paused.
A bool, true if paused.isControls ()
Returns whether the native browser controls are shown.
A bool, true if controls are visible.setControls (bool Controls)
Shows or hides the native browser playback controls.
Controls is a bool; true to show native controls.this objectgetWidth ()
Gets the element width in pixels.
An int with the width.setWidth (int Width)
Sets the element width in pixels.
Width is an int.this objectgetHeight ()
Gets the element height in pixels.
An int with the height.setHeight (int Height)
Sets the element height in pixels.
Height is an int.this objectgetVideoWidth ()
Gets the intrinsic width of the video track in pixels.
An int with the video track width.getVideoHeight ()
Gets the intrinsic height of the video track in pixels.
An int with the video track height.canPlayType (string Type)
Tests browser support for a video MIME type.
Type is a string such as "video/mp4" or "video/webm".A string: "probably", "maybe", or "" (unsupported).addListener (string Event, callback Handler, object PassedArg = null)
Registers an event listener on the video element. Common event names include "play", "pause", "ended", "error", and "timeupdate".
Event is a string with the event name.Handler is a callback invoked as Handler(eventName, passedArg).PassedArg is an optional value forwarded to the handler.this object