v0.2.1 (#53)
* ios proxy app, tune vp8 tunnel * refactor go modules, move headless joiner android to a go captcha * restore emojis in vk bot keyboard * headless support in vk bot * remove telemost dc hooks, update cretor-app ui and bot * remove telemost support from go code, add fallback to video if mode == dc in joiners * fix headless creators in windows * update vk call creation autoclick * force desktop useragent for creator app * kick disconnected user in headless vk creator immediately when connection is lost * update README.md * update SETUP.md * update release version * add fallback for link creation in vk bot
This commit is contained in:
1 parent
9e1f2a98d9
commit
1b2d6bc5d3
89 files changed
+3503
-2158
No files matched your search
+15
-9
@@ -143,27 +143,33 @@ func (p *P2PHandler) OnPionICECandidate(data json.RawMessage) {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *P2PHandler) kickRemotePeer() {
|
||||
if p.remotePeerId != nil {
|
||||
p.bridge.vkSend("remove-participant", map[string]interface{}{
|
||||
"participantId": *p.remotePeerId,
|
||||
"ban": false,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// OnConnectionState updates P2P connection state.
|
||||
func (p *P2PHandler) OnConnectionState(state string) {
|
||||
switch state {
|
||||
case "connected":
|
||||
p.connected = true
|
||||
log.Println("\n TUNNEL CONNECTED\n")
|
||||
log.Print("\n TUNNEL CONNECTED\n")
|
||||
case "disconnected":
|
||||
p.connected = false
|
||||
log.Println("[p2p] Connection disconnected, waiting for peer to rejoin")
|
||||
log.Println("[p2p] Connection disconnected, kicking peer")
|
||||
p.kickRemotePeer()
|
||||
case "failed":
|
||||
p.connected = false
|
||||
log.Println("[p2p] Connection failed, removing stale peer")
|
||||
if p.remotePeerId != nil {
|
||||
p.bridge.vkSend("remove-participant", map[string]interface{}{
|
||||
"participantId": *p.remotePeerId,
|
||||
"ban": false,
|
||||
})
|
||||
}
|
||||
p.kickRemotePeer()
|
||||
case "closed":
|
||||
p.connected = false
|
||||
log.Println("[p2p] Connection closed")
|
||||
log.Println("[p2p] Connection closed, kicking peer")
|
||||
p.kickRemotePeer()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user