SoraConnection class
Sora との接続を管理するオブジェクトです。
Properties
- abnormalTerminationStartedForTest → bool
-
テスト専用に、
_abnormalTerminationStartedフラグの現在値を返す。no setter - bundleId → String?
-
バンドル ID
no setter
- config → SoraConnectionConfig
-
SoraConnection 初期化時に指定した設定
final
- connectionId → String?
-
サーバーから割り当てられた接続 ID
no setter
-
debugEvents
→ Stream<
SoraDebugEvent> -
デバッグイベントを受け取る Stream
no setter
-
debugMessages
→ Stream<
String> -
デバッグ用の文字列メッセージを受け取る Stream
no setter
- disconnectingForTest → bool
-
テスト専用に、
_disconnectingフラグの現在値を返す。no setter - eventChannelName → String
-
プラットフォーム側 EventChannel のチャネル名
カメラやレンダリングのプラットフォームイベント受信に使う。
final
-
events
→ Stream<
SoraConnectionEvent> -
統合イベント Stream
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasWebSocketMessageTailForTest → bool
-
テスト専用に、WebSocket メッセージ tail が保持されているかを返す。
no setter
- id → int
-
Flutter SDK の SoraConnection のローカル ID
プラットフォーム側で SoraConnection インスタンスを識別するために割り当てられる。
final
- isAudioEnabled → bool
-
音声トラックが有効かどうかを返す
no setter
- isVideoEnabled → bool
-
映像トラックが有効かどうかを返す
no setter
-
localVideo
→ Stream<
SoraLocalVideoHandle> -
ローカル映像の表示に使うハンドルを受け取る Stream。
no setter
-
remoteMediaStreams
→ Map<
String, RemoteMediaStream> -
リモート接続ごとの MediaStream 一覧を返す
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverClientId → String?
-
サーバーから返されたクライアント ID
no setter
- sessionId → String?
-
セッション ID
no setter
- signalingHasActiveTransportForTest → bool
-
テスト専用に、シグナリング transport が残存しているかどうかを返す。
no setter
- teardownFailureForTest ↔ Object?
-
テスト専用に
_teardownNativeSessionの失敗を模擬するためのフック。getter/setter pair
Methods
-
connect(
[LocalMediaStream? stream]) → Future< void> - MediaStream を使って接続する。
-
disconnect(
) → Future< void> - 進行中の connect を打ち切りつつ、切断処理を 1 本に直列化して実行する。
-
dispose(
) → Future< void> - 接続と関連リソースを順序付きで解放する。
-
emitLocalVideoForTest(
int? textureId) → void -
テスト専用に
_emitLocalVideoを呼び出すラッパー。 -
enqueueWebSocketMessageForTest(
Object? message) → Future< void> -
テスト専用に
_enqueueWebSocketMessageを呼び出すラッパー。 -
getStats(
) → Future< String?> - WebRTC 統計情報を取得する
-
handleRedirectMessageForTest(
Map< String, Object?> payload) → Future<void> -
テスト専用に
_handleRedirectMessageを呼び出すラッパー。 -
handleWebrtcEventForTest(
String type, Map< String, Object?> data) → Future<void> -
テスト専用に
_handleWebrtcEventを呼び出すラッパー。 -
injectSignalingWebSocketForTest(
WebSocketChannel channel) → void - テスト専用に、redirect 起動前のシグナリング WebSocket 状態を注入する。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAudioTrack(
LocalMediaStream stream) → Future< void> - 接続中の audio sender から track を外す。
-
removeVideoTrack(
LocalMediaStream stream) → Future< void> - 接続中の video sender から track を外す。
-
replaceAudioTrack(
LocalMediaStream stream, LocalMediaStreamTrack track) → Future< void> - 接続中の audio sender に新しい track を設定する。
-
replaceVideoTrack(
LocalMediaStream stream, LocalMediaStreamTrack track) → Future< void> - 接続中の video sender に新しい track を設定する。
-
rpc(
String method, {Object? params, SoraRpcOptions options = const SoraRpcOptions()}) → Future< Object?> - JSON-RPC リクエストを rpc DataChannel 経由で送信する
-
sendDataChannelMessage(
String label, Uint8List data) → void - カスタム DataChannel 経由でメッセージを送信する
-
setAudioEnabled(
bool enabled) → void - 音声トラックの有効/無効を切り替える
-
setVideoEnabled(
bool enabled) → void - 映像トラックの有効/無効を切り替える
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createForTest(
{required SoraConnectionConfig config, required int clientId, required String eventChannelName}) → SoraConnection -
テスト専用に MethodChannel を介さず
SoraConnectionを構築する。