IvsPlayer class
IvsPlayer is a singleton class that acts as an interface to control the IVS (Interactive Video Service) player. It manages the playback, streaming quality, and state of the player, and provides various streams for tracking player status.
Constructors
- IvsPlayer()
-
Factory constructor to return the singleton instance.
factory
Properties
-
durationStream
↔ StreamController<
Duration> -
StreamController to broadcast the total duration of the content being played.
getter/setter pair
-
errorStream
↔ StreamController<
String> -
StreamController to broadcast any errors encountered during playback.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isAutoQualityStream
↔ StreamController<
bool> -
StreamController to broadcast whether auto-quality adjustment is enabled.
getter/setter pair
-
playeStateStream
↔ StreamController<
PlayerState> -
StreamController to broadcast the current state of the player.
getter/setter pair
-
positionStream
↔ StreamController<
Duration> -
StreamController to broadcast the current position of the player.
getter/setter pair
-
qualities
→ ValueNotifier<
List< String> > -
ValueNotifier to hold the available streaming qualities.
final
-
qualityStream
↔ StreamController<
String> -
StreamController to broadcast the current streaming quality.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
syncTimeStream
↔ StreamController<
Duration> -
StreamController to broadcast the sync time of the player.
getter/setter pair
Methods
-
buildPlayerView(
) → Widget - Builds the player view widget. The player view is created using a platform-specific view (AndroidView or UiKitView).
-
getQualities(
) → Future< void> - Retrieves the available streaming qualities and updates the qualities ValueNotifier.
-
isAutoQuality(
) → Future< bool> - Checks whether auto-quality adjustment is enabled.
-
muteUnmute(
) → void - Toggles mute/unmute for the player.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pauses the player.
-
resume(
) → void - Resumes playback on the player.
-
seekTo(
Duration duration) → Future< void> -
Seeks the player to the specified
duration
. -
setQuality(
String value) → Future< void> -
Sets the streaming quality to the specified
value
. -
startPlayer(
String url, {bool autoPlay = true}) → void -
Starts the player with a given
url
and optionalautoPlay
flag. -
stopPlayer(
) → void - Stops the player and cancels the position update stream subscription.
-
toggleAutoQuality(
) → Future< void> - Toggles the auto-quality adjustment setting.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited