Documentation
¶
Index ¶
- Constants
- Variables
- func AuthAndGetToken(client *http.Client, roomID, displayName string) (string, string, string, string, error)
- func AuthAsLoggedIn(client *http.Client, cookieHeader, accessToken, roomID, displayName string) (string, string, string, string, error)
- func CreateRoom(client *http.Client, accessToken string) (string, error)
- func GetConnectionDetails(client *http.Client, accessToken, roomID, displayName string) (string, string, error)
- func JoinRoom(client *http.Client, accessToken, roomID string) error
- func KickParticipant(client *http.Client, accessToken, roomID, participantID string) error
- func ParseRoomID(input string) string
- func RefreshAccessToken(client *http.Client, cookieHeader, deviceID string) (string, error)
- func RegisterGuest(client *http.Client, displayName string) (string, error)
- func SetParticipantPermissions(client *http.Client, accessToken, roomID, participantID string, ...) error
- type Session
- type SessionConfig
Constants ¶
View Source
const ( APIBase = "https://stream.wb.ru" Origin = "https://stream.wb.ru" )
View Source
const ( TunnelModeVideo = "video" TunnelModeDC = "dc" )
Variables ¶
View Source
var ModeratorPermissions = []string{
"ROOM_PERMISSION_SEND_CHAT",
"ROOM_PERMISSION_SHARE_AUDIO",
"ROOM_PERMISSION_SHARE_SCREEN",
"ROOM_PERMISSION_SHARE_VIDEO",
"ROOM_PERMISSION_MODIFY_PERMISSIONS",
"ROOM_PERMISSION_MODERATE_ROOM",
"ROOM_PERMISSION_CALL_DATA_ACCESS",
"ROOM_PERMISSION_LOCAL_RECORD",
}
View Source
var WBStreamCookieAllowlist = []string{
"wbx-refresh",
"x_wbaas_token",
"_wbauid",
"wbx-validation-key",
}
Functions ¶
func AuthAndGetToken ¶
func AuthAsLoggedIn ¶
func GetConnectionDetails ¶
func KickParticipant ¶
func ParseRoomID ¶
ParseRoomID accepts a bare room id, a wbstream://<id> link, or a https://stream.wb.ru/room/<id> URL and returns the room id.
func RefreshAccessToken ¶
Types ¶
type Session ¶
type Session struct {
OnConnected func(tunnel.DataTunnel)
OnPeerRestart func()
// OnRemoteCandidate is forwarded from the underlying LiveKit client.
// It fires for every trickle ICE candidate sent by the SFU, plus
// once with target=-1 for every SDP description (carrying inline
// candidates) before the description is applied to Pion.
OnRemoteCandidate func(target int, candidateOrSDP string)
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession(cfg SessionConfig) *Session
func (*Session) AdaptTrackCount ¶
func (*Session) MarkConfigAcked ¶
func (s *Session) MarkConfigAcked()
type SessionConfig ¶
type SessionConfig struct {
RoomToken string
ServerURL string
DisplayName string
TunnelMode string
Obfuscator *tunnel.TunnelObfuscator
LogFn func(string, ...any)
SettingEngine *webrtc.SettingEngine
NetDialContext func(ctx context.Context, network, addr string) (net.Conn, error)
ResolveICEHost func(host string) (string, error)
VP8FPS int
VP8Batch int
RoomID string
AccessToken string
ReadBuf int
IsJoiner bool // when true, run the configPingPong loop; only the joiner sends VP8 config to the peer
Reliable bool
}
Click to show internal directories.
Click to hide internal directories.