cleanup dead code, update gitignore
This commit is contained in:
1 parent
da3bf64efc
commit
b2cb0cbd42
4 files changed
+1
-56
No files matched your search
@@ -8,3 +8,4 @@
|
|||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
local.properties
|
local.properties
|
||||||
|
.kotlin/
|
||||||
@@ -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() {
|
func (b *Bridge) sendInitBundle() {
|
||||||
if b.initBundleSent {
|
if b.initBundleSent {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -116,23 +116,6 @@ func httpPost(endpoint string, form url.Values, extraHeaders map[string]string)
|
|||||||
return io.ReadAll(resp.Body)
|
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) {
|
func authAndJoin(cookieStr, okJoinLink string, cfg VKConfig) (*JoinResponse, error) {
|
||||||
auth := func(bearer string) map[string]string {
|
auth := func(bearer string) map[string]string {
|
||||||
return map[string]string{"Authorization": "Bearer " + bearer}
|
return map[string]string{"Authorization": "Bearer " + bearer}
|
||||||
|
|||||||
@@ -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) {
|
func (t *VP8DataTunnel) nextKeepalive(sampleInterval time.Duration) (ticks, padLen int) {
|
||||||
t.cfgMu.Lock()
|
t.cfgMu.Lock()
|
||||||
minPeriod, maxPeriod, padMax := t.keepaliveMin, t.keepaliveMax, t.keepalivePadMax
|
minPeriod, maxPeriod, padMax := t.keepaliveMin, t.keepaliveMax, t.keepalivePadMax
|
||||||
|
|||||||
Reference in new issue
Block a user