Documentation
¶
Overview ¶
Copyright 2018 Cibifang. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
- type ClientBody
- type ClientMsg
- type Handle
- type Janus
- func (j *Janus) Close()
- func (j *Janus) DefaultMsgChan() chan []byte
- func (j *Janus) Handle(sid uint64, hid uint64) (*Handle, bool)
- func (j *Janus) MsgChan(tid string) (msgChan chan []byte, exist bool)
- func (j *Janus) NewSess(id uint64) *Session
- func (j *Janus) NewTransaction() string
- func (j *Janus) Send(msg interface{})
- func (j *Janus) Session(id uint64) (sess *Session, exist bool)
- type Jsep
- type ServerData
- type ServerMsg
- type ServerMsgChan
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientBody ¶
type ClientBody struct {
Request string `json:"request,omitempty"`
Room uint64 `json:"room,omitempty"`
Ptype string `json:"ptype,omitempty"`
Feed uint64 `json:"feed,omitempty"`
PrivateId uint64 `json:"private_id,omitempty"`
Display string `json:"display,omitempty"`
Audio bool `json:"audio,omitempty"`
Video bool `json:"video,omitempty"`
Audiocodec string `json:"audiocodec,omitempty"`
Videocodec string `json:"videocodec,omitempty"`
}
type ClientMsg ¶
type ClientMsg struct {
Janus string `json:"janus,omitempty"`
Plugin string `json:"plugin,omitempty"`
Transaction string `json:"transaction,omitempty"`
SessionId uint64 `json:"session_id,omitempty"`
HandleId uint64 `json:"handle_id,omitempty"`
Body ClientBody `json:"body,omitempty"`
}
WebSocket message send to janus.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) DefaultMsgChan ¶
func (*Handle) NewTransaction ¶
type Janus ¶
type Janus struct {
// contains filtered or unexported fields
}
func (*Janus) DefaultMsgChan ¶
func (*Janus) NewTransaction ¶
type ServerData ¶
type ServerData struct {
Id int `json:"id,omitempty"`
}
type ServerMsg ¶
type ServerMsg struct {
Janus string `json:"janus,omitempty"`
Transaction string `json:"transaction,omitempty"`
Data ServerData `json:"data,omitempty"`
SessionId int `json:"session_id,omitempty"`
HandleId int `json:"handle_id,omitempty"`
Plugindata struct {
Plugin string `json:"plugin,omitempty"`
Data struct {
Videoroom string `json:"videoroom,omitempty"`
Room int64 `json:"room,omitempty"`
Permanent bool `json:"permanent,omitempty"`
Description string `json:"description,omitempty"`
Id int64 `json:"id,omitempty"`
PrivateId int64 `json:"private_id,omitempty"`
Publishers []struct {
Id int64 `json:"id,omitempty"`
Display string `json:"display,omitempty"`
AudioCodec string `json:"audio_codec,omitempty"`
VideoCodec string `json:"video_codec,omitempty"`
} `json:"publishers,omitempty"`
} `json:"data,omitempty"`
} `json:"plugindata,omitempty"`
Jsep struct {
Type string `json:"type,omitempty"`
Sdp string `json:"sdp,omitempty"`
} `json:"jsep,omitempty"`
}
type ServerMsgChan ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) DefaultMsgChan ¶
func (*Session) NewTransaction ¶
Click to show internal directories.
Click to hide internal directories.