OmniPlaybackController class abstract
An abstract interface for controlling video playback across multiple source types.
OmniPlaybackController defines a unified API for managing video playback, supporting various sources such as network streams, local files, or third-party platforms (e.g., YouTube, Vimeo). It includes methods for controlling playback, volume, seek, fullscreen, and other media-related properties.
- Mixed-in types
Constructors
Properties
-
availableVideoQualities
→ List<
OmniVideoQuality> ? -
List of selectable video qualities (e.g., 1080p, 720p).
no setter
-
buffered
→ List<
DurationRange> -
A list of buffered video ranges.
no setter
- currentPosition → Duration
-
The current playback position.
no setter
- currentVideoQuality → OmniVideoQuality?
-
The currently selected video quality.
no setter
- duration → Duration
-
The total duration of the video.
no setter
- hasError → bool
-
Whether an error occurred during initialization or playback.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- hasStarted → bool
-
Whether playback has started at least once.
no setter
- isBuffering → bool
-
Whether the video is currently buffering.
no setter
- isFinished → bool
-
Whether playback has reached the end of the video.
no setter
- isFullScreen → bool
-
Whether the player is currently in fullscreen mode.
no setter
- isFullyVisible ↔ bool
-
Whether the video player widget is fully visible within the viewport.
getter/setter pair
- isLive → bool
-
Whether the current video is a live stream.
no setter
- isMuted → bool
-
Whether the video is currently muted.
no setter
- isPlaying → bool
-
Whether playback is currently active.
no setter
- isReady → bool
-
Whether the video is fully initialized and ready to play.
no setter
- isSeeking ↔ bool
-
Whether the player is actively seeking to a position.
getter/setter pair
- playbackSpeed ↔ double
-
Gets the current playback speed of the video.
getter/setter pair
- rotationCorrection → int
-
Degrees of rotation to apply for video orientation correction.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
A notifier containing the shared video player widget.
no setter
- size → Size
-
The intrinsic size (width and height) of the video.
no setter
- videoDataSource → String?
-
The raw data source of the video, such as a URL or asset path.
no setter
- videoId → String?
-
A unique video identifier (e.g., YouTube/Vimeo video ID).
no setter
-
videoQualityUrls
→ Map<
OmniVideoQuality, Uri> ? -
A map of available video qualities to their corresponding URIs.
no setter
- videoSourceType → VideoSourceType
-
The type of video source (e.g., asset, network, YouTube, etc.).
no setter
- videoUrl → Uri?
-
The resolved video URL, if available.
no setter
- volume ↔ double
-
The current audio volume, from 0.0 (mute) to 1.0 (max).
getter/setter pair
- wasPlayingBeforeSeek ↔ bool
-
Whether playback was active prior to a seek operation.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
loadVideoSource(
VideoSourceConfiguration videoSourceConfiguration) → void - Loads a new video source dynamically, replacing the current one.
-
mute(
) → void - Mutes the video.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pause(
{bool useGlobalController = true}) → Future< void> - Pauses the current playback.
-
play(
{bool useGlobalController = true}) → Future< void> - Starts or resumes playback.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
replay(
{bool useGlobalController = true}) → Future< void> - Restarts the video from the beginning.
-
seekTo(
Duration position) → void -
Seeks the playback to the given
position
. -
switchFullScreenMode(
BuildContext context, {required Widget pageBuilder(BuildContext)?, void onToggle(bool)?}) → Future< void> - Switches fullscreen mode for the video player.
-
switchQuality(
OmniVideoQuality quality) → Future< void> -
Switches the video playback quality to the specified
quality
. -
toggleMute(
) → void - Toggles the mute state between muted and unmuted.
-
toString(
) → String -
A string representation of this object.
inherited
-
unMute(
) → void - Unmutes the video.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited