NECallEngine class abstract
Primary CallKit engine entry point exposed to Flutter.
Use NECallEngine.instance to initialize the SDK, place and receive calls, and control audio/video behavior during a call.
Desktop runtime keeps the same public lifecycle as mobile:
setup -> call/accept/hangup -> destroy.
The Windows/macOS implementation is backed by desktop/bridge via Dart
FFI. If a public API does not yet have a native desktop export, it returns
an explicit unsupported result instead of falling back to mobile-only
plugin channels.
For multi-client login alignment on desktop, the public API still does not add a desktop-only kicked-offline callback. Active-call kicked scenarios are normalized into NECallEngineDelegate.onCallEnd with NECallTerminalCode.kicked, while kicked detail stays inside desktop adapter / host coordination.
- Annotations
-
- @HawkEntryPoint.new()
Constructors
- NECallEngine()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
rtcRawEvents
→ Stream<
Map< String, dynamic> > -
A broadcast stream of raw NERtc events forwarded by the desktop bridge.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept(
) → Future< NEResult< NECallInfo> > - Accepts the current incoming call.
-
addCallDelegate(
NECallEngineDelegate delegate) → void - Adds a call delegate to receive call-related callbacks.
-
call(
String accId, NECallType callType, {String? extraInfo, String? rtcChannelName, String? globalExtraCopy, NECallPushConfig? pushConfig}) → Future< NEResult< NECallInfo> > -
Places an outgoing call to the specified
accId. -
destroy(
) → Future< VoidResult> - Destroys the engine and releases underlying resources.
-
enableLocalVideo(
bool enable) → Future< VoidResult> - Enables or disables the local video stream.
-
getAudioPlaybackDevices(
) → Future< List< NEDesktopAudioDevice> > - Returns available desktop audio playback devices.
-
getAudioRecordingDevices(
) → Future< List< NEDesktopAudioDevice> > - Returns available desktop audio recording devices.
-
getCallConfig(
) → Future< NECallConfig?> -
Returns the current call configuration, or
nullif none is set. -
getCallInfo(
) → Future< NECallInfo?> -
Returns information about the current call, or
nullif there is no call. -
getCurrentAudioPlaybackDeviceId(
) → Future< String?> - Returns the currently selected desktop audio playback device id.
-
getCurrentAudioRecordingDeviceId(
) → Future< String?> - Returns the currently selected desktop audio recording device id.
-
getCurrentVideoCaptureDeviceId(
) → Future< String?> - Returns the currently selected desktop video capture device id.
-
getUserWithRtcUid(
int uid) → Future< NEUserInfo?> -
Returns user information for the given RTC
uid, if available. -
getVersion(
) → Future< String> - Returns the version string of the underlying CallKit SDK.
-
getVideoCaptureDevices(
) → Future< List< NEDesktopVideoDevice> > - Returns available desktop video capture devices.
-
hangup(
{String? channelId, String? extraString}) → Future< VoidResult> - Hangs up the current call.
-
isSpeakerphoneOn(
) → Future< bool> - Returns whether the speakerphone is currently enabled.
-
muteLocalAudio(
bool muted) → Future< VoidResult> - Mutes or unmutes the local audio stream.
-
muteLocalVideo(
bool muted) → Future< VoidResult> - Mutes or unmutes the local video stream.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeCallDelegate(
NECallEngineDelegate delegate) → void - Removes a previously added call delegate.
-
setAudioPlaybackDevice(
String deviceId) → Future< VoidResult> -
Switches the active desktop audio playback device to
deviceId. -
setAudioRecordingDevice(
String deviceId) → Future< VoidResult> -
Switches the active desktop audio recording device to
deviceId. -
setCallConfig(
{bool enableOffline = true, bool enableSwitchVideoConfirm = false, bool enableSwitchAudioConfirm = false}) → Future< VoidResult> - Updates the call configuration used by the engine.
-
setCallRecordProvider(
NERecordProvider? provider) → void - Sets the call record provider used to send call records.
-
setSpeakerphoneOn(
bool enable) → Future< VoidResult> - Enables or disables the speakerphone.
-
setTimeout(
int time) → Future< VoidResult> - Sets the call timeout in seconds.
-
setup(
NESetupConfig config) → Future< VoidResult> -
Initializes CallKit with the given
config. -
setupLocalView(
int viewId) → Future< VoidResult> -
Binds the local video stream to the render target identified by
viewId. -
setupRemoteView(
int viewId) → Future< VoidResult> -
Binds the remote video stream to the render target identified by
viewId. -
setVideoCaptureDevice(
String deviceId) → Future< VoidResult> -
Switches the active desktop video capture device to
deviceId. -
startASRCaption(
NEASRCaptionConfig config) → Future< VoidResult> -
Starts ASR (speech-to-text) captioning with the given
config. -
stopASRCaption(
) → Future< VoidResult> - Stops the currently running ASR captioning session.
-
switchCallType(
NECallType callType, NECallSwitchState state) → Future< VoidResult> - Switches the current call type, for example from audio to video.
-
switchCamera(
) → Future< VoidResult> - Switches between available cameras (for example, front and back).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → NECallEngine
-
no setter