BIG rewrite stream info

This commit is contained in:
Alex X
2024-06-15 16:46:03 +03:00
parent ecfe802065
commit 96504e2fb0
88 changed files with 1043 additions and 854 deletions
+5 -3
View File
@@ -3,19 +3,21 @@ package webtorrent
import (
"encoding/base64"
"fmt"
"strconv"
"time"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/webrtc"
"github.com/gorilla/websocket"
pion "github.com/pion/webrtc/v3"
"strconv"
"time"
)
func NewClient(tracker, share, pwd string, pc *pion.PeerConnection) (*webrtc.Conn, error) {
// 1. Create WebRTC producer
prod := webrtc.NewConn(pc)
prod.Desc = "WebRTC/WebTorrent sync"
prod.FormatName = "webtorrent"
prod.Mode = core.ModeActiveProducer
prod.Protocol = "ws"
medias := []*core.Media{
{Kind: core.KindVideo, Direction: core.DirectionRecvonly},