This commit is contained in:
yumoqing 2024-10-11 12:39:01 +08:00
parent 071497acd3
commit ac8d773579

View File

@ -199,8 +199,8 @@ bricks.RTCP2PConnect = class {
add_handler(type, f){
this.signal_handlers[type] = f;
}
get_handler(type){
return this.signal_handlers[type];
get_handler(typ){
return this.signal_handlers[typ];
}
async p2pconnect(peer){
@ -289,7 +289,7 @@ bricks.RTCP2PConnect = class {
async recvdata_handler(data){
console.log('recvdata=', data, this.signal_handlers);
var f = this.signal_handlers[data.type];
var f = this.get_handler(data.type);
if (f) {
await f(data);
}