feat: 控制指令消息改为protobuf二进制

This commit is contained in:
2026-07-15 17:03:58 +08:00
parent 92ad90cbeb
commit da1730ce19
21 changed files with 658 additions and 147 deletions

View File

@@ -4,6 +4,7 @@ import 'dart:convert';
import 'package:flutter_webrtc/flutter_webrtc.dart';
import '../models/signal_message.dart';
import '../proto/control_message.pb.dart';
import '../signaling/signaling_client.dart';
import '../webrtc/webrtc_controller.dart';
@@ -113,9 +114,9 @@ class RemoteController {
});
}
/// 发送控制指令(JSON 字符串)。
void sendControlCommand(String commandJson) {
_webRtc?.sendControlCommand(commandJson);
/// 发送控制指令(protobuf 二进制)。
void sendControlCommand(ControlMessage command) {
_webRtc?.sendControlCommand(command);
}
/// 断开连接并释放资源。