This commit is contained in:
yumoqing 2024-10-11 12:31:53 +08:00
parent 491ffe236e
commit 071497acd3

View File

@ -135,7 +135,7 @@ bricks.Signaling = class {
var opts = bricks.extend({}, this.connect_options);
opts.peer_info = peer;
var h = new k(this, session, opts);
this.add_handler(sessionid, h.recvdata_handler);
this.add_handler(sessionid, h.recvdata_handler.bind(h) );
return h
}
login(){
@ -288,7 +288,7 @@ bricks.RTCP2PConnect = class {
}
async recvdata_handler(data){
console.log('recvdata=', data);
console.log('recvdata=', data, this.signal_handlers);
var f = this.signal_handlers[data.type];
if (f) {
await f(data);