VideoCanvas class

Inheritance
  • Object
  • NativeClass
  • VideoCanvas

Constructors

VideoCanvas([NativeClassOptions? options])

Properties

$resource → NativeResource
no setterinherited
backgroundColor FutureOr<int?>
@brief Set the background color of the canvas which is not filled with video frame. The range is [0x00000000, 0xFFFFFFFF]. The default is 0x00000000. The Alpha index is ignored.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ready Future<void>
Whether the instance is initialized
no setterinherited
renderMode FutureOr<int?>
@brief Rendering mode, the value must be RENDER_MODE_HIDDEN(1), RENDER_MODE_FIT(2), or RENDER_MODE_FILL(3). The default value is RENDER_MODE_HIDDEN(1).
getter/setter pair
renderRotation FutureOr<VideoRotation?>
@brief Video frame rotation angle. See VideoRotation{@link #VideoRotation}. The default value is 0, which means no rotation is applied.
This parameter only applies to remote video and does not affect local video settings.
getter/setter pair
renderSurface FutureOr
@brief Local surface handler.
When you render the Surface object, use the field, and set renderView to null.
getter/setter pair
renderView FutureOr
@brief Local view handler.
When you render the View object, use the field, and set renderSurface to null.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
inherited
nativeCall<T>(String method, [List? args, NativeMethodMeta? meta]) Future<T>
Call instance method
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendInstanceGet<T>(String property) Future<T>
Get instance property
inherited
sendInstancePropertiesGet(dynamic nativeClass) Future<Map<String, dynamic>>
Get instance properties
inherited
sendInstanceSet(String property, dynamic value) Future<void>
Set instance property
inherited
toString() String
A string representation of this object.
inherited
updateResource(NativeResource resource) → void
inherited

Operators

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

Static Properties

codegen_$namespace → dynamic
no setter
RENDER_MODE_FILL Future<int>
@brief Fill the canvas.
The video frame is scaled to fill the canvas. During the process, the aspect ratio may change.
no setter
RENDER_MODE_FIT Future<int>
@brief Fit.
The video frame is scaled with fixed aspect ratio, and is shown completely in the canvas. The region of the canvas not filled with video frame, is filled with background.
no setter
RENDER_MODE_HIDDEN Future<int>
@brief (Default) Fill and Crop.
The video frame is scaled with fixed aspect ratio, and completely fills the canvas. The region of the video exceeding the canvas will be cropped.
no setter