This commit is contained in:
yumoqing 2024-10-09 15:13:50 +08:00
parent 94a39305fc
commit d8c26731ce

View File

@ -292,19 +292,19 @@ bricks.RTCP2PConnect = class {
dc.onclose = this.datachannl_close(this, peer);
}
async def datachannel_message(peer, msg){
async datachannel_message(peer, msg){
var dc = this.peers[peer.id].dc;
if (this.opts.on_dc_messaage){
await this.opts.on_dc_message(dc, msg);
}
}
async def datachannel_open(peer){
async datachannel_open(peer){
var dc = this.peers[peer.id].dc
if (this.opts.on_dc_open){
await this.opts.on_dc_open(dc);
}
}
async def datachannel_close(peer){
async datachannel_close(peer){
var dc = this.peers[peer.id].dc
if (this.opts.on_dc_close){
await this.opts.on_dc_close(dc);