diff --git a/android-app/.gitignore b/android-app/.gitignore index 87f66f5..d46c827 100644 --- a/android-app/.gitignore +++ b/android-app/.gitignore @@ -8,3 +8,4 @@ .externalNativeBuild .cxx local.properties +.kotlin/ diff --git a/headless/telemost/main.go b/headless/telemost/main.go index 4cfa43c..2fba128 100644 --- a/headless/telemost/main.go +++ b/headless/telemost/main.go @@ -302,29 +302,6 @@ func (b *Bridge) sendICE(cand *webrtc.ICECandidate, target string, pcSeq int) { }) } -func (b *Bridge) requestVideoSlots() { - b.setSlotsKey++ - log.Printf("[tm-ws] -> setSlots key=%d", b.setSlotsKey) - b.wsSend(tmapi.SetSlotsMessage(b.setSlotsKey)) -} - -func (b *Bridge) forceReconnect(reason string) { - oldPeerID := b.connInfo.PeerID - log.Printf("[tm-ws] forcing reconnect: %s", reason) - if oldPeerID != "" { - log.Printf("[tm-ws] kicking self pid=%s to leave call cleanly", oldPeerID) - if err := b.kickPeer(oldPeerID); err != nil { - log.Printf("[tm-ws] self-kick failed: %v", err) - } - } - clientInstanceID = uuid.New().String() - log.Printf("[tm-ws] new instance-id=%s", clientInstanceID) - b.mu.Lock() - ws := b.ws - b.mu.Unlock() - common.CloseWS(ws) -} - func (b *Bridge) sendInitBundle() { if b.initBundleSent { return diff --git a/headless/vk/main.go b/headless/vk/main.go index 6f87e43..19f366b 100644 --- a/headless/vk/main.go +++ b/headless/vk/main.go @@ -116,23 +116,6 @@ func httpPost(endpoint string, form url.Values, extraHeaders map[string]string) return io.ReadAll(resp.Body) } -func httpGet(endpoint string) ([]byte, error) { - req, err := http.NewRequest("GET", endpoint, nil) - if err != nil { - return nil, err - } - req.Header.Set("User-Agent", common.UserAgent) - resp, err := http.DefaultClient.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - if strings.Contains(resp.Request.URL.String(), "challenge") { - return nil, fmt.Errorf("VK captcha required - open %s in browser and solve it", resp.Request.URL.String()) - } - return io.ReadAll(resp.Body) -} - func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, error) { auth := func(bearer string) map[string]string { return map[string]string{"Authorization": "Bearer " + bearer} diff --git a/relay/tunnel/vp8tunnel.go b/relay/tunnel/vp8tunnel.go index 7624d21..c3ea2f7 100644 --- a/relay/tunnel/vp8tunnel.go +++ b/relay/tunnel/vp8tunnel.go @@ -83,22 +83,6 @@ func NewVP8DataTunnelWithQueue(track *webrtc.TrackLocalStaticSample, obf *Tunnel } } -func (t *VP8DataTunnel) SetKeepaliveShape(minPeriod, maxPeriod time.Duration, padMax int) { - t.cfgMu.Lock() - if minPeriod > 0 { - t.keepaliveMin = minPeriod - } - if maxPeriod >= t.keepaliveMin { - t.keepaliveMax = maxPeriod - } - if padMax >= 0 { - t.keepalivePadMax = padMax - } - newMin, newMax, newPad := t.keepaliveMin, t.keepaliveMax, t.keepalivePadMax - t.cfgMu.Unlock() - t.logFn("vp8tunnel: keepalive shape min=%s max=%s padMax=%d", newMin, newMax, newPad) -} - func (t *VP8DataTunnel) nextKeepalive(sampleInterval time.Duration) (ticks, padLen int) { t.cfgMu.Lock() minPeriod, maxPeriod, padMax := t.keepaliveMin, t.keepaliveMax, t.keepalivePadMax