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 ( /** * A publisher can publish streams, subscribe to streams, and signal. */ Publisher Role = "publisher" /** * A subscriber can only subscribe to streams. */ Subscriber = "subscriber" /** * In addition to the privileges granted to a publisher, in clients using the OpenTok.js 2.2 * library, a moderator can call the <code>forceUnpublish()</code> and * <code>forceDisconnect()</code> method of the Session object. */ Moderator = "moderator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveMode ¶
type ArchiveMode string
const ( /** * The session will be manually archived (default option). */ ManualArchive ArchiveMode = "manual" /** * The session will be automatically archived. */ AlwaysArchive = "always" )
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"` SessionStatus string `json:"session_status"` MediaServerURL string `json:"media_server_url"` T *Tokbox `json:"-"` }
type Tokbox ¶
type Tokbox struct { BetaUrl string //Endpoint for Beta Programs // contains filtered or unexported fields }
func (*Tokbox) NewSession ¶
func (t *Tokbox) NewSession(location string, mm MediaMode, am ArchiveMode, ctx ...context.Context) (*Session, error)
Creates a new tokbox session or returns an error. See README file for full documentation: https://github.com/aogz/tokbox NOTE: ctx must be nil if *not* using Google App Engine
Click to show internal directories.
Click to hide internal directories.