ApiVideoLiveStreamController class
Controller of the live streaming
Constructors
- ApiVideoLiveStreamController({required AudioConfig initialAudioConfig, required VideoConfig initialVideoConfig, CameraPosition initialCameraPosition = CameraPosition.back, VoidCallback? onConnectionSuccess, dynamic onConnectionFailed(String)?, VoidCallback? onDisconnection, dynamic onError(Exception)?})
- Creates a new ApiVideoLiveStreamController instance.
- ApiVideoLiveStreamController.fromListener({required AudioConfig initialAudioConfig, required VideoConfig initialVideoConfig, CameraPosition initialCameraPosition = CameraPosition.back, ApiVideoLiveStreamEventsListener? listener})
Properties
-
cameraPosition
→ Future<
CameraPosition> -
Gets the current camera position
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Gets the current state of the video player.
no setter
-
isMuted
→ Future<
bool> -
Gets if live stream is muted or not.
no setter
-
isStreaming
→ Future<
bool> -
Gets if live stream is streaming or not.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textureId → int
-
This is just exposed for testing. Do not use it.
no setter
-
videoSize
→ Future<
Size?> -
no setter
Methods
-
addEventsListener(
ApiVideoLiveStreamEventsListener listener) → void -
addWidgetListener(
ApiVideoLiveStreamWidgetListener listener) → void - This is exposed for internal use only. Do not use it.
-
buildPreview(
) → Widget - Builds the preview widget.
-
dispose(
) → Future< void> - Disposes the live stream instance.
-
initialize(
) → Future< void> - Creates a new live stream instance with initial audio and video configurations.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEventsListener(
ApiVideoLiveStreamEventsListener listener) → void -
removeWidgetListener(
ApiVideoLiveStreamWidgetListener listener) → void - This is exposed for internal use only. Do not use it.
-
setAudioConfig(
AudioConfig audioConfig) → Future< void> - Sets new audio parameters.
-
setCameraPosition(
CameraPosition position) → Future< void> - Sets the current camera position
-
setIsMuted(
bool isMuted) → Future< void> - Mutes/unmutes the microphone.
-
setVideoConfig(
VideoConfig videoConfig) → Future< void> - Sets new video parameters.
-
startPreview(
) → Future< void> - Starts the camera preview.
-
startStreaming(
{required String streamKey, String url = "rtmp://broadcast.api.video/s/"}) → Future< void> -
Starts the live stream to the specified "
url
/streamKey
". -
stop(
) → Future< void> - Same as stopStreaming and stopPreview
-
stopPreview(
) → Future< void> - Stops the camera preview.
-
stopStreaming(
) → Future< void> - Stops the live stream.
-
switchCamera(
) → Future< void> - Changes current back/front camera to front/back camera
-
toggleMute(
) → Future< void> - Toggle mutes/unmutes from the microphone. See isMuted and setIsMuted.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- kUninitializedTextureId → const int