MethodChannelShortsPlayer class
An implementation of ShortsPlayerPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- ShortsPlayerPlatform
- MethodChannelShortsPlayer
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- onBufferingUpdate ↔ dynamic Function(int index, String url, int percent)?
-
getter/setter pair
- onDebugInfo ↔ dynamic Function(int index, String message)?
-
getter/setter pair
- onError ↔ dynamic Function(int index, String url, String errorMessage, String errorCode)?
-
getter/setter pair
- onPlaybackStateChanged ↔ dynamic Function(int index, String url, String state)?
-
getter/setter pair
-
onPlayerStateUpdate
↔ dynamic Function(Map<
String, dynamic> stateInfo)? -
getter/setter pair
- onProgress ↔ dynamic Function(int index, String url, int positionMs, int durationMs, int bufferedMs)?
-
getter/setter pair
- onVideoDimensionsChanged ↔ dynamic Function(int index, String url, double width, double height)?
-
getter/setter pair
- onVideoLoaded ↔ dynamic Function(int index, String url)?
-
Callbacks for status updates
getter/setter pair
- onWatched ↔ dynamic Function(int index, String url)?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appendUrls(
int startIndex, List< String> urls) → Future<void> -
Append multiple URLs starting at a given index
override
-
attach(
int index) → Future< int> -
Attach texture to a player index and return texture ID
override
-
diagnoseVideoState(
int index) → Future< void> -
Diagnose video state for debugging (outputs to native logs)
override
-
disposeIndex(
int index) → Future< void> -
Dispose a specific player index
override
-
getPlatformVersion(
) → Future< String?> -
override
-
getPlaybackInfo(
int index) → Future< Map< String, dynamic> ?> -
Get playback information for a specific player index
override
-
init(
) → Future< void> -
Initialize the player pool
override
-
isPaused(
) → Future< bool> -
Check if the current player is paused
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< void> -
Pause the current active player
override
-
play(
) → Future< void> -
Play the current active player
override
-
prewarm(
{int? next, int? prev}) → Future< void> -
Prewarm next and/or previous players
override
-
prime(
int index) → Future< void> -
Prime (prepare) a player at the given index
override
-
release(
) → Future< void> -
Release all players and resources
override
-
setLooping(
bool enabled) → Future< void> -
Enable or disable video looping
override
-
setMuted(
bool enabled) → Future< void> -
Enable or disable mute
override
-
setProgressTracking(
{bool enabled = true, int? intervalMs}) → Future< void> -
Configure progress tracking
override
-
setQuality(
{double? peakBps, double? maxWidth, double? maxHeight}) → Future< void> -
Set video quality preferences
override
-
setUrl(
int index, String url, {String? thumbnailUrl}) → Future< void> -
Set video URL for a specific player index
override
-
setVolume(
double volume) → Future< void> -
Set playback volume (0.0 to 1.0)
override
-
switchTo(
int index) → Future< void> -
Switch to and play a specific player index
override
-
togglePlayPause(
) → Future< void> -
Toggle play/pause state
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited