mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-27 19:12:07 +02:00
Do not read prometheus metrics
This commit is contained in:
@ -2,7 +2,6 @@ package webrtc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
|
||||
"io"
|
||||
"log"
|
||||
"math/rand"
|
||||
@ -13,6 +12,7 @@ import (
|
||||
"github.com/pion/webrtc/v3/pkg/media"
|
||||
"github.com/pion/webrtc/v3/pkg/media/ivfreader"
|
||||
"github.com/pion/webrtc/v3/pkg/media/oggreader"
|
||||
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
|
||||
)
|
||||
|
||||
// Options holds web package configuration
|
||||
@ -47,6 +47,11 @@ func removeTrack(tracks []*webrtc.Track, track *webrtc.Track) []*webrtc.Track {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetNumberConnectedSessions get the number of currently connected clients
|
||||
func GetNumberConnectedSessions() int {
|
||||
return len(videoTracks)
|
||||
}
|
||||
|
||||
// newPeerHandler is called when server receive a new session description
|
||||
// this initiates a WebRTC connection and return server description
|
||||
func newPeerHandler(remoteSdp webrtc.SessionDescription, cfg *Options) webrtc.SessionDescription {
|
||||
|
Reference in New Issue
Block a user