MeeduPlayerController class
Constructors
- MeeduPlayerController({ScreenManager screenManager = const ScreenManager(), Color colorTheme = Colors.redAccent, Widget? loadingWidget, bool controlsEnabled = true, String? errorText, ControlsStyle controlsStyle = ControlsStyle.primary, Widget? header, Widget? bottomRight, CustomIcons customIcons = const CustomIcons(), EnabledButtons enabledButtons = const EnabledButtons(), void onVideoPlayerClosed()?})
-
creates an instance of
MeeduPlayerControlle
Properties
- autoplay → bool
-
autoPlay
is true if the player has enabled the autoplayno setter - bottomRight ↔ Widget?
-
getter/setter pair
-
brightness
→ Rx<
double> -
volume is true if the player controls are visible
no setter
-
buffered
→ Rx<
List< DurationRange> > -
bufferedLoaded
buffered Loaded for network resourcesno setter -
bufferedPercent
↔ Rx<
double> -
getter/setter pair
-
bufferingVideoDuration
↔ Rx<
bool> -
getter/setter pair
- bufferStream ↔ StreamSubscription?
-
getter/setter pair
-
closedCaptionEnabled
→ Rx<
bool> -
no setter
- colorTheme → Color
-
final
- controls ← bool
-
show or hide the player controls
no getter
- controlsEnabled → bool
-
final
- controlsStyle → ControlsStyle
-
final
- customIcons ↔ CustomIcons
-
use this class to change the default icons with your custom icons
getter/setter pair
- dataStatus → MeeduPlayerDataStatus
-
the dataStatus to notify the load sources events
dataStatus has a
status
observablefinal -
doubleTapCount
↔ Rx<
int> -
getter/setter pair
-
duration
→ Rx<
Duration> -
duration of the video
no setter
- enabledButtons ↔ EnabledButtons
-
use this class to hide some buttons in the player
getter/setter pair
- errorText → String?
-
no setter
-
fits
↔ List<
BoxFit> -
getter/setter pair
-
forwardIcons
↔ Rx<
bool> -
getter/setter pair
-
fullscreen
→ Rx<
bool> -
fullscreen is true if the player is in fullscreen mode
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- header ↔ Widget?
-
getter/setter pair
-
isBuffering
↔ Rx<
bool> -
isInPipMode
is true if pip mode is enabledgetter/setter pair - loadingWidget ↔ Widget?
-
getter/setter pair
- looping → bool
-
looping is true if the player is looping
no setter
- mouseMoveInitial ↔ double
-
getter/setter pair
-
mute
→ Rx<
bool> -
mute is true if the player is muted
no setter
-
onBrightnessChanged
→ Stream<
double> -
no setter
-
onBufferedChanged
→ Stream<
List< DurationRange> > -
no setter
-
onClosedCaptionEnabledChanged
→ Stream<
bool> -
no setter
-
onDataStatusChanged
→ Stream<
DataStatus> -
use this stream to listen the player data events like none, loading, loaded, error
no setter
-
onDurationChanged
→ Stream<
Duration> -
use this stream to listen the changes in the video duration
no setter
-
onFullscreenChanged
→ Stream<
bool> -
no setter
-
onMuteChanged
→ Stream<
bool> -
no setter
-
onPlayerStatusChanged
→ Stream<
PlayerStatus> -
use this stream to listen the player data events like stopped, playing, paused
no setter
-
onPositionChanged
→ Stream<
Duration> -
use this stream to listen the changes in the video position
no setter
-
onShowBrightnessStatusChanged
→ Stream<
bool> -
no setter
-
onShowControlsChanged
→ Stream<
bool> -
no setter
-
onShowSwipeDurationChanged
→ Stream<
bool> -
no setter
-
onShowVolumeStatusChanged
→ Stream<
bool> -
no setter
-
onSliderPositionChanged
→ Stream<
Duration> -
no setter
-
onSwipeDurationChanged
→ Stream<
int> -
no setter
- onVideoPlayerClosed ↔ void Function()?
-
getter/setter pair
-
onVolumeChanged
→ Stream<
double> -
no setter
- playbackSpeed → double
-
the playback speed default value is 1.0
no setter
- playBackStream ↔ StreamSubscription?
-
getter/setter pair
- playerStatus → MeeduPlayerStatus
-
the playerStatus to notify the player events like paused,playing or stopped
playerStatus has a
status
observablefinal -
position
→ Rx<
Duration> -
current position of the player
no setter
- postionStream ↔ StreamSubscription?
-
getter/setter pair
- prefs ↔ SharedPreferences?
-
getter/setter pair
-
rewindIcons
↔ Rx<
bool> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenManager → ScreenManager
-
Screen Manager to define the overlays and device orientation when the player enters in fullscreen mode
final
-
showBrightnessStatus
→ Rx<
bool> -
showSwipeDuration is true if the player controls are visible
no setter
-
showControls
→ Rx<
bool> -
showControls is true if the player controls are visible
no setter
-
showSwipeDuration
→ Rx<
bool> -
showSwipeDuration is true if the player controls are visible
no setter
-
showVolumeStatus
→ Rx<
bool> -
showSwipeDuration is true if the player controls are visible
no setter
-
sliderPosition
→ Rx<
Duration> -
sliderPosition the video slider position
no setter
-
swipeDuration
→ Rx<
int> -
swipeDuration is true if the player controls are visible
no setter
- tag ↔ String?
-
getter/setter pair
- timerForTrackingMouse ↔ Timer?
-
getter/setter pair
-
videoFit
→ Rx<
BoxFit> -
returns the os version
returns true if the pip mode can used on the current device, the initial value will be false after check if pip is available
return fit of the Video,By default it is set to BoxFit.contain
no setter
-
videoFitChanged
↔ Rx<
bool> -
getter/setter pair
- videoFitChangedTimer ↔ Timer?
-
getter/setter pair
- videoPlayerController → VideoPlayerController?
-
videoPlayerController instace of VideoPlayerController
no setter
- videoPlayerControllerWindows → Player?
-
videoPlayerController instace of VideoPlayerController
no setter
-
volume
→ Rx<
double> -
volume is true if the player controls are visible
no setter
- volumeStream ↔ StreamSubscription?
-
getter/setter pair
- windows ↔ bool
-
getter/setter pair
Methods
-
dispose(
) → Future< void> - dispose de video_player controller
-
extractAudioAndVideoTs(
String m3u8, {String initialSubtitle = "", String formatter(String quality)?, bool descending = true}) → Future< String> -
fastForward(
) → Future< void> - fast Forward (10 seconds)
-
getCurrentBrightness(
) → Future< void> -
getCurrentVolume(
) → Future< void> -
getUserPreferenceForBrightness(
) → Future< void> -
getUserPreferenceForFit(
) → Future< void> -
goToFullscreen(
BuildContext context, {bool applyOverlaysAndOrientations = true}) → Future< void> - show the player in fullscreen mode
-
launchAsFullscreen(
BuildContext context, {required DataSource dataSource, bool autoplay = false, bool looping = false, Widget? header, Widget? bottomRight, Duration seekTo = Duration.zero}) → Future< void> - launch a video using the fullscreen apge
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChangedSlider(
double v) → dynamic -
onChangedSliderEnd(
) → void -
onChangedSliderStart(
) → void -
onClosedCaptionEnabled(
bool enabled) → void - enable or diable the visibility of ClosedCaptionFile
-
onVideoFitChange(
BoxFit fit) → void - Change Video Fit accordingly
-
pause(
{bool notify = true}) → Future< void> - pause the current video
-
play(
{bool repeat = false}) → Future< void> - play the current video
-
registerHotKeys(
) → Future< void> -
removeWindowsListener(
) → Future< void> -
resetBrightness(
) → Future< void> -
rewind(
) → Future< void> - rewind (10 seconds)
-
seekTo(
Duration position) → Future< void> - seek the current video position
-
setBrightness(
double brightnes) → Future< void> -
setDataSource(
DataSource dataSource, {bool autoplay = true, bool looping = false, Duration seekTo = Duration.zero}) → Future< void> - set the video data source
-
setLooping(
bool looping) → Future< void> - Sets whether or not the video should loop after playing once
-
setMute(
bool enabled) → Future< void> - set the video player to mute or sound
-
setPlaybackSpeed(
double speed) → Future< void> -
Sets the playback speed of
this
. -
setPlayerDataSource(
DataSource dataSource, Player player, dynamic seekTo) → dynamic -
setUserPreferenceForBrightness(
) → Future< void> -
setUserPreferenceForFit(
) → Future< void> -
setVolume(
double volumeNew) → Future< void> - Sets the audio volume volume indicates a value between 0.0 (silent) and 1.0 (full volume) on a linear scale.
-
togglePlaybackSpeed(
) → Future< void> -
toggleVideoFit(
) → void - Toggle Change the videofit accordingly
-
toString(
) → String -
A string representation of this object.
inherited
-
videoPlayerClosed(
) → Future< void> -
videoSeekToNextSeconds(
int seconds, bool playing) → Future< void> - enter to picture in picture mode only Android
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → MeeduPlayerController