VideoController class

VideoController

VideoController is used to initialize & display video output. It takes reference to existing Player instance from package:media_kit.

Passing VideoController to Video widget will cause the video output to be displayed.

late final player = Player();
late final controller = VideoController(player);

Configurable options:

  1. You can limit size of the video output by specifying VideoControllerConfiguration.width & VideoControllerConfiguration.height.
  2. You can reduce scale of the video output by specifying VideoControllerConfiguration.scale.
  3. You can switch between GPU & CPU rendering by specifying VideoControllerConfiguration.enableHardwareAcceleration.

Platform specific limitations & differences:

Android

Web

Constructors

VideoController(Player player, {VideoControllerConfiguration configuration = const VideoControllerConfiguration()})
VideoController

Properties

hashCode int
The hash code for this object.
no setterinherited
id ValueNotifier<int?>
Texture ID of the video output, registered with Flutter engine by the native implementation.
final
notifier ValueNotifier<PlatformVideoController?>
Platform specific internal implementation initialized depending upon the current platform.
final
platform Completer<PlatformVideoController>
Platform specific internal implementation initialized depending upon the current platform.
final
player Player
The Player instance associated with this VideoController.
final
rect ValueNotifier<Rect?>
Rect of the video output, received from the native implementation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
waitUntilFirstFrameRendered Future<void>
A Future that completes when the first video frame has been rendered.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setSize({int? width, int? height}) Future<void>
Sets the required size of the video output. This may yield substantial performance improvements if a small width & height is specified.
toString() String
A string representation of this object.
inherited

Operators

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