feat: 控制指令消息改为protobuf二进制
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/// 断开连接并释放资源。
|
||||
|
||||
Reference in New Issue
Block a user