Documentation ¶
Index ¶
Constants ¶
View Source
const ( Days30 = 2592000 // 30 * 24 * 60 * 60 Weeks1 = 604800 // 7 * 24 * 60 * 60 Hours24 = 86400 // 24 * 60 * 60 Hours2 = 7200 // 60 * 60 * 2 Hours1 = 3600 // 60 * 60 )
View Source
const ( // Publisher can publish streams, subscribe to streams, and signal. Publisher Role = "publisher" // Subscriber can only subscribe to streams. Subscriber = "subscriber" // Moderator, in addition to the privileges granted to a publisher, in clients using the OpenTok.js 2.2 // library, can call the `forceUnpublish()` and // `forceDisconnect()` method of the Session object. Moderator = "moderator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveList ¶ added in v0.1.2
type ArchiveList struct { Count int64 `json:"count"` Items []ArchiveMetadata `json:"items"` }
type ArchiveMetadata ¶ added in v0.1.2
type ArchiveMetadata struct { ID string `json:"id"` Name string `json:"name"` CreatedAt int64 `json:"createdAt"` Duration int64 `json:"duration"` Event string `json:"event"` HasAudio bool `json:"hasAudio"` HasVideo bool `json:"hasVideo"` OutputMode string `json:"outputMode"` PartnerID int64 `json:"partnerId"` Password string `json:"password"` ProjectID int64 `json:"projectId"` Reason string `json:"reason"` Resolution string `json:"resolution"` SessionID string `json:"sessionId"` Sha256Sum string `json:"sha256sum"` Size int64 `json:"size"` Status string `json:"status"` UpdatedAt int64 `json:"updatedAt"` URL *string `json:"url"` }
type ArchiveStatusChanges ¶
type ArchiveStatusChanges struct { ID string `json:"id"` Name string `json:"name"` Event string `json:"event"` CreatedAt int64 `json:"createdAt"` Duration int64 `json:"duration"` PartnerID int64 `json:"partnerId"` Reason string `json:"reason"` Resolution string `json:"resolution"` SessionID string `json:"sessionId"` Size int64 `json:"size"` Status string `json:"status"` URL string `json:"url"` }
ArchiveStatusChanges notification body for the callback, see https://tokbox.com/developer/guides/archiving/ for more details.
type MediaMode ¶
type MediaMode string
const ( // The session will send streams using the OpenTok Media Router. MediaRouter MediaMode = "disabled" // The session will attempt send streams directly between clients. If clients cannot connect // due to firewall restrictions, the session uses the OpenTok TURN server to relay streams. P2P = "enabled" )
type Session ¶
type Session struct { SessionID string `json:"session_id"` ProjectID string `json:"project_id"` PartnerID string `json:"partner_id"` CreateDt string `json:"create_dt"` Status string `json:"session_status"` MediaServerURL string `json:"media_server_url"` // contains filtered or unexported fields }
func (*Session) ArchiveList ¶ added in v0.1.2
func (s *Session) ArchiveList() (*ArchiveList, error)
func (*Session) StartArchive ¶
func (s *Session) StartArchive(name string) (*ArchiveMetadata, error)
func (*Session) StopArchive ¶
type Tokbox ¶
type Tokbox struct {
// contains filtered or unexported fields
}
func (*Tokbox) NewSession ¶
Creates a new tokbox session or returns an error. See README file for full documentation: https://github.com/pjebs/tokbox
func (*Tokbox) SessionFromID ¶
Click to show internal directories.
Click to hide internal directories.