fallback vp8 legacy tunnel to legacy webview approaches
This commit is contained in:
1 parent
29dbf814cc
commit
6adeb9ced3
6 files changed
+241
-26
No files matched your search
@@ -23,8 +23,7 @@ type TelemostClient struct {
|
||||
pcs map[string]*tmPCState
|
||||
pcMu sync.Mutex
|
||||
sampleTrack *webrtc.TrackLocalStaticSample
|
||||
vp8tunnel *tunnel.VP8DataTunnel
|
||||
obf *tunnel.TunnelObfuscator
|
||||
vp8tunnel *tunnel.VP8LegacyTunnel
|
||||
logFn func(string, ...any)
|
||||
LocalIP string
|
||||
ipReady chan struct{}
|
||||
@@ -32,16 +31,6 @@ type TelemostClient struct {
|
||||
OnConnected func(tunnel.DataTunnel)
|
||||
}
|
||||
|
||||
func (c *TelemostClient) Configure(joinLink string) error {
|
||||
obf, err := tunnel.NewTunnelObfuscator(tunnel.DeriveSecretFromJoinLink(joinLink))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
c.obf = obf
|
||||
c.logFn("telemost: obfuscator localEpoch=0x%08x", obf.LocalEpoch())
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewTelemostClient(logFn func(string, ...any)) *TelemostClient {
|
||||
if logFn == nil {
|
||||
logFn = log.Printf
|
||||
@@ -176,7 +165,7 @@ func (c *TelemostClient) handleICEServers(data json.RawMessage, role string) {
|
||||
c.logFn("telemost: === CONNECTED - starting VP8 tunnel ===")
|
||||
c.logFn("telemost: sampleTrack id=%s kind=%s", c.sampleTrack.ID(), c.sampleTrack.Kind().String())
|
||||
c.logFn("telemost: pub senders=%d receivers=%d", len(pc.GetSenders()), len(pc.GetReceivers()))
|
||||
c.vp8tunnel = tunnel.NewVP8DataTunnel(c.sampleTrack, c.obf, c.logFn)
|
||||
c.vp8tunnel = tunnel.NewVP8LegacyTunnel(c.sampleTrack, c.logFn)
|
||||
c.vp8tunnel.Start(0, 0)
|
||||
if c.OnConnected != nil {
|
||||
c.OnConnected(c.vp8tunnel)
|
||||
|
||||
Reference in new issue
Block a user