mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-30 15:51:14 +02:00
Put webrtc SDP inside Quality struct
This commit is contained in:
15
web/web.go
15
web/web.go
@ -10,7 +10,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/markbates/pkger"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"gitlab.crans.org/nounous/ghostream/messaging"
|
||||
)
|
||||
|
||||
@ -33,13 +32,6 @@ type Options struct {
|
||||
var (
|
||||
cfg *Options
|
||||
|
||||
// WebRTC session description channels
|
||||
remoteSdpChan chan struct {
|
||||
StreamID string
|
||||
RemoteDescription webrtc.SessionDescription
|
||||
}
|
||||
localSdpChan chan webrtc.SessionDescription
|
||||
|
||||
// Preload templates
|
||||
templates *template.Template
|
||||
|
||||
@ -78,13 +70,8 @@ func loadTemplates() error {
|
||||
}
|
||||
|
||||
// Serve HTTP server
|
||||
func Serve(s *messaging.Streams, rSdpChan chan struct {
|
||||
StreamID string
|
||||
RemoteDescription webrtc.SessionDescription
|
||||
}, lSdpChan chan webrtc.SessionDescription, c *Options) {
|
||||
func Serve(s *messaging.Streams, c *Options) {
|
||||
streams = s
|
||||
remoteSdpChan = rSdpChan
|
||||
localSdpChan = lSdpChan
|
||||
cfg = c
|
||||
|
||||
if !cfg.Enabled {
|
||||
|
Reference in New Issue
Block a user