XmaxRealtimeDualVideo class final

A Flutter widget that overlays local and remote video tracks and switches between them.

The local preview remains underneath. After remoteTrack renders its first frame, the result appears above the preview. Stopping or unbinding the remote stream restores local preview. When generation stops, remote video is hidden before resources are released to avoid black flashes.

For picture-in-picture or custom layouts, compose multiple XmaxRealtimeVideo widgets instead.

Inheritance

Constructors

XmaxRealtimeDualVideo({Key? key, RealtimeVideoTrack? localTrack, RealtimeVideoTrack? remoteTrack, VideoContentMode videoContentMode = VideoContentMode.fill, double remoteVideoFadeInDuration = 0.3, bool isInteractionEnabled = true, TrajectoryEffectRendering? trajectoryRenderer, VoidCallback? onRemoteVideoReady})
Creates a dual-track realtime video widget.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
isInteractionEnabled → bool
Whether to submit interaction trails on visible remote video; enabled by default.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
localTrack → RealtimeVideoTrack?
The local preview track shown before a remote result appears and after it stops.
final
onRemoteVideoReady → VoidCallback?
The callback invoked when the first remote frame is rendered and displayed; use it to dismiss loading UI.
final
remoteTrack → RealtimeVideoTrack?
The remote generation track.
final
remoteVideoFadeInDuration → double
The remote video's fade-in duration, in seconds. The default is 0.3.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trajectoryRenderer → TrajectoryEffectRendering?
The remote interaction trail renderer; defaults to the SDK renderer.
final
videoContentMode → VideoContentMode
The shared video scaling mode; defaults to aspect fill with cropping.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<XmaxRealtimeDualVideo>
Creates the state managing preview transitions and remote readiness notifications.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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