Add bubble protocol support

- Register bubble stream handler using go2rtc pkg/bubble
- Add default port 80 for bubble scheme
This commit is contained in:
eduard256
2026-04-01 17:24:02 +00:00
parent 20d5ad2f0b
commit 8e8f568251
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import (
var defaultPorts = map[string]int{
"rtsp": 554, "rtsps": 322, "http": 80, "https": 443,
"rtmp": 1935, "mms": 554, "rtp": 5004,
"rtmp": 1935, "mms": 554, "rtp": 5004, "bubble": 80,
}
type StreamParams struct {
+8
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"strings"
"github.com/AlexxIT/go2rtc/pkg/bubble"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/rtsp"
)
@@ -28,6 +29,13 @@ func init() {
RegisterSource("rtsp", rtspHandler)
RegisterSource("rtsps", rtspHandler)
RegisterSource("rtspx", rtspHandler)
RegisterSource("bubble", bubbleHandler)
}
// bubbleHandler -- Dial handles TCP connect, HTTP handshake, XML parsing, and auth.
// ex. "bubble://admin:pass@192.168.1.100:80/bubble/live?ch=0&stream=0"
func bubbleHandler(rawURL string) (core.Producer, error) {
return bubble.Dial(rawURL)
}
// rtspHandler -- Dial + Describe. Proves: port open, RTSP responds, auth OK, SDP received.