add files and ci
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m34s

This commit is contained in:
Smile Rex
2026-01-26 15:18:05 +03:00
commit f85d36b183
8 changed files with 342 additions and 0 deletions

23
track.go Normal file
View File

@@ -0,0 +1,23 @@
package main
import (
"github.com/pion/rtp"
"github.com/pion/webrtc/v4"
)
type Track struct {
Local *webrtc.TrackLocalStaticRTP
}
func NewTrack(remote *webrtc.TrackRemote) *Track {
local, _ := webrtc.NewTrackLocalStaticRTP(
remote.Codec().RTPCodecCapability,
remote.ID(),
remote.StreamID(),
)
return &Track{Local: local}
}
func (t *Track) Write(pkt *rtp.Packet) {
t.Local.WriteRTP(pkt)
}