signaling

package
v0.0.0-...-de8bd7b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISignaling

type ISignaling interface {
	Publish(id, ssrc string) (int, error)
	Unpublish(id string) error
	GetStreamStatus(id string) (bool, error)
}

type Srs

type Srs struct {
	Ctx  context.Context
	Addr string // The address of SRS, eg: http://localhost:1985
}

func (*Srs) GetStreamStatus

func (s *Srs) GetStreamStatus(id string) (bool, error)
{
    "code": 0,
    "server": "vid-y19n6nm",
    "service": "382k456r",
    "pid": "9495",
    "streams": [{
        "id": "vid-9y0ozy0",
        "name": "0551954854",
        "vhost": "vid-v2ws53u",
        "app": "live",
        "tcUrl": "webrtc://127.0.0.1:1985/live",
        "url": "/live/0551954854",
        "live_ms": 1720428680003,
        "clients": 1,
        "frames": 8431,
        "send_bytes": 66463941,
        "recv_bytes": 89323998,
        "kbps": {
            "recv_30s": 0,
            "send_30s": 0
        },
        "publish": {
            "active": false,
            "cid": "b3op069g"
        },
        "video": null,
        "audio": null
    }]
}

func (*Srs) Publish

func (s *Srs) Publish(id, ssrc string) (int, error)

func (*Srs) Unpublish

func (s *Srs) Unpublish(id string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL