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, bool pipEnabled = false, bool showPipButton = false, CustomIcons customIcons = const CustomIcons(), EnabledButtons enabledButtons = const EnabledButtons()})
creates an instance of MeeduPlayerControlle

Properties

autoplay bool
autoPlay is true if the player has enabled the autoplay
no setter
bottomRight Widget?
getter/setter pair
buffered → Rx<List<DurationRange>>
bufferedLoaded buffered Loaded for network resources
no setter
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 observable
final
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
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
getter/setter pair
isBuffering ↔ Rx<bool>
getter/setter pair
isInPipMode → Rx<bool>
isInPipMode is true if pip mode is enabled
no setter
loadingWidget Widget?
getter/setter pair
looping bool
looping is true if the player is looping
no setter
mute → Rx<bool>
mute is true if the player is muted
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
onPipModeChanged 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
onShowControlsChanged Stream<bool>
no setter
onSliderPositionChanged Stream<Duration>
no setter
osVersion Future<double>
returns the os version
no setter
pipAvailable → Rx<bool>
returns true if the pip mode can used on the current device, the initial value will be false after check if pip is available
no setter
pipEnabled bool
final
playbackSpeed double
the playback speed default value is 1.0
no setter
playerStatus MeeduPlayerStatus
the playerStatus to notify the player events like paused,playing or stopped playerStatus has a status observable
final
position → Rx<Duration>
current position of the player
no setter
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
showControls → Rx<bool>
showControls is true if the player controls are visible
no setter
showPipButton bool
final
sliderPosition → Rx<Duration>
sliderPosition the video slider position
no setter
tag String?
getter/setter pair
videoFit → Rx<BoxFit>
return fit of the Video,By default it is set to BoxFit.contain
no setter
videoPlayerController VideoPlayerController?
videoPlayerController instace of VideoPlayerController
no setter

Methods

dispose() Future<void>
dispose de video_player controller
enterPip(BuildContext context) Future<void>
enter to picture in picture mode only Android
fastForward() Future<void>
fast Forward (10 seconds)
goToFullscreen(BuildContext context, {bool appliyOverlaysAndOrientations = 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}) 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
rewind() Future<void>
rewind (10 seconds)
seekTo(Duration position) Future<void>
seek the current video position
setDataSource(DataSource dataSource, {bool autoplay = true, bool looping = false, Duration? seekTo}) 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.
setVolume(double volume) Future<void>
Sets the audio volume volume indicates a value between 0.0 (silent) and 1.0 (full volume) on a linear scale.
toggleVideoFit() → void
Toggle Change the videofit accordingly
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) MeeduPlayerController