feat: ice断开返回配置页面
This commit is contained in:
@@ -27,6 +27,9 @@ class RemoteController {
|
||||
/// 连接断开。
|
||||
void Function()? onDisconnected;
|
||||
|
||||
/// ICE 连接断开(用于提示用户并返回连接设置)。
|
||||
void Function(String message)? onIceDisconnected;
|
||||
|
||||
/// 远端视频渲染器就绪。
|
||||
void Function(RTCVideoRenderer renderer)? onRemoteStream;
|
||||
|
||||
@@ -72,6 +75,7 @@ class RemoteController {
|
||||
_webRtc!.onDisconnected = () {
|
||||
onDisconnected?.call();
|
||||
};
|
||||
_webRtc!.onIceDisconnected = (message) => onIceDisconnected?.call(message);
|
||||
_webRtc!.onRemoteStream = (renderer) => onRemoteStream?.call(renderer);
|
||||
_webRtc!.initialize().catchError((e) {
|
||||
onStatusChanged?.call('状态: 连接失败 - $e');
|
||||
|
||||
Reference in New Issue
Block a user