AgoraController class
Controller for connecting and disconnecting Agora.io, etc.
First give channelName to specify the channel.
connect to make a connection and disconnect to disconnect.
Agora.ioの接続や切断等を行うコントローラー。
最初にchannelNameを与えてチャンネルを指定してください。
connectで接続を行い、disconnectで切断を行います。
- Inheritance
-
- Object
- ChangeNotifier
- MasamuneControllerBase<
List< AgoraUser> , AgoraMasamuneAdapter> - AgoraController
Constructors
-
AgoraController(String channelName, {AgoraMasamuneAdapter? adapter, List<
LoggerAdapter> loggerAdapters = const []}) - Controller for connecting and disconnecting Agora.io, etc.
Properties
- adapter → AgoraMasamuneAdapter
-
TAdapter
to be used.no setterinherited - bitRate → int
-
Communication bit rate (kbps) when connecting to a remote.
no setter
- cameraDirection → CameraDirection
-
Get the In and Out of the current camera.
no setter
- capturing → bool
-
If a screenshot of the delivered video is currently being taken,
true
is returned.no setter - channelName → String
-
Name of the channel to connect.
final
- channelProfile → ChannelProfileType
-
Specify the profile of the channel to be connected.
no setter
- clientRole → ClientRoleType
-
Specify your role if you specify ChannelProfileType.channelProfileLiveBroadcasting.
no setter
- connected → bool
-
Returns
true
if connected.no setter -
connecting
→ Future<
void> ? -
If a connection is currently being attempted, it returns its Future.
no setter
-
disconnecting
→ Future<
void> ? -
If a disconnect attempt is currently in progress, returns its Future.
no setter
- enableAudio ↔ bool
-
Returns
true
if Audio is enabled.getter/setter pair - enableCustomVideoSource → bool
-
If you want to use a custom video source, set it to
true
.no setter - enableDataStream → bool
-
Set to
true
to use data stream.no setter - enableVideo ↔ bool
-
Returns
true
if Video is enabled.getter/setter pair - frameRate → int
-
Screen frame rate when connecting to a remote.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- localName → String?
-
User name for the connection.
no setter
- localUserNumber → int?
-
User number used by Agora.io when connecting.
no setter
-
loggerAdapters
→ List<
LoggerAdapter> -
Adapter to define loggers.
no setter
- mute ↔ bool
-
If the audio is muted,
true
is returned.getter/setter pair - orientation → AgoraVideoOrientation
-
Specifies the orientation of the screen for shooting.
no setter
- permission → AgoraPermission
-
Controller around authority.
final
- primaryAdapter → AgoraMasamuneAdapter
-
Specifies the default
TAdapter
if adapter is Null.no setteroverride -
recordingAudio
→ Future<
void> ? -
If the delivery video is currently being recorded,
true
is returned.no setter - recordingVideo → bool
-
If the delivery video is currently being recorded,
true
is returned.no setter - recordURL → String
-
Get the URL of the video when recording with startRecording.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenCaptureURL → String
-
Get the URL of the image when a screenshot is taken with startScreenCapture.
no setter
-
value
→ List<
AgoraUser> ? -
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setterinherited
- videoDimensions → VideoDimensions
-
Screen size when connecting to a remote.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
checkRecordURLIsActive(
) → Future< bool> - Check if recordURL is currently available.
-
connect(
{required String userName, AgoraVideoProfile videoProfile = AgoraVideoProfile.size640x360Rate15, CameraDirection cameraDirection = CameraDirection.cameraRear, bool enableAudio = true, bool enableVideo = true, bool? enableRecordingOnConnect, bool? enableScreenCaptureOnConnect, ChannelProfileType channelProfile = ChannelProfileType.channelProfileLiveBroadcasting, ClientRoleType clientRole = ClientRoleType.clientRoleBroadcaster, AgoraVideoOrientation orientation = AgoraVideoOrientation.landscape, bool enableCustomVideoSource = false, void onReceivedDataStream(int streamId, AgoraUser from, Uint8List data)?}) → Future< void> - Connect to a new channel.
-
disconnect(
) → Future< void> - Disconnect from channel.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pushCustomVideo(
Uint8List bytes, VideoPixelFormat videoPixelFormat, double width, double height, {DateTime? timestamp}) → Future< void> - Push the video to be delivered.
-
reconnect(
) → Future< void> - Reconnect to the network and join the room again.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
sendDataStream(
Uint8List message) → Future< void> -
Sends
message
as a data stream. -
setScreen(
{AgoraVideoProfile? videoProfile, AgoraVideoOrientation? orientation}) → Future< void> -
By passing
videoProfile
andorientation
, the screen size and frame rate can be specified. -
setValueInternal(
List< AgoraUser> ? value) → void -
Set method is used to update the current state.
inherited
-
startAudioRecording(
String filePath, {AudioSampleRateType sampleRate = AudioSampleRateType.audioSampleRate44100, AudioRecordingQualityType quality = AudioRecordingQualityType.audioRecordingQualityMedium}) → Future< void> - If already connected, record the delivered video.
-
startRecording(
) → Future< void> - If already connected, record the delivered video.
-
startScreenCapture(
) → Future< void> - If already connected, take a screenshot of the delivered video.
-
stopAudioRecording(
) → Future< void> - Stops recording that has already started.
-
stopRecording(
) → Future< void> - Stops a recording that has already started.
-
stopScreenCapture(
) → Future< void> - Stops taking screenshots that have already been started.
-
switchCamera(
) → void - Swap the camera In and Out.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- query → const _$AgoraControllerQuery
- Query for AgoraController.