eyeson

package module
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 21 Imported by: 0

README

eyeson go library

A golang client for the eyeson video conferencing API.

eyeson ninja gopher

The public API is documented via GoDoc.

Usage

package main

import (
	"fmt"

	"github.com/eyeson-team/eyeson-go"
)

func main() {
	eyesonAPIKey := "..."
	client, _ := eyeson.NewClient(eyesonAPIKey)
	room, _ := client.Rooms.Join("standup meeting", "mike", map[string]string{})
	fmt.Println("Join via: ", room.Data.Links.Gui)
	room.WaitReady()
	overlayURL := "https://eyeson-team.github.io/api/images/eyeson-overlay.png"
	// Set a foreground image.
	room.SetLayer(overlayURL, eyeson.Foreground, nil)
	// Send a chat message.
	room.Chat("Welcome!")
}

In order to receive events from the running meeting, connect on the observer socket like this:

client, _ := eyeson.NewClient(eyesonApiKey)
room, _ := client.Rooms.Join("standup meeting", "mike")
msgCh, _ := client.Observer.Connect(context.Background(), room.Data.Room.ID)
for {
	select {
	case msg, ok := <-msgCh:
		if !ok {
			fmt.Println("Channel closed. Probably disconnected")
			return
		}
		fmt.Println("Received event type: ", msg.GetType())
		switch m := msg.(type) {
		case *eyeson.Chat:
			fmt.Printf("Chat: %s - %s\n", m.ClientID, m.Content)
		}
	}
}

Development

make test # run go tests
# run an example program that starts a meeting, adds an overlay and sends
# a chat message.
API_KEY=... go run examples/meeting.go
# run an example program that listens for webhooks. please ensure the endpoint
# is public available.
API_KEY=... go run examples/webhook-listener.go <endpoint-url>

Releases

  • 1.7.0 Add GetCurrentMeetings, GetRoomUsers, Recording functions
  • 1.6.2 Add audio to playback options
  • 1.6.1 fixes layout user array
  • 1.6.0 webp+svg support, lock-meeting, snpashots
  • 1.5.0 Allow creating user-service via accesskey
  • 1.4.0 Add Source forward functionality
  • 1.3.0 Add Observer functionality
  • 1.1.1 Add Shutdown, Fix Webhook Response Validation
  • 1.1.0 Add Webhook Handling
  • 1.0.0 Initial Release

Documentation

Overview

Package eyeson provides a client to interact with the eyeson video API to start video meetings, create access for participants, control recordings, add media like overlay images, play videos, start and stop broadcasts, send chat messages or assign participants to various layouts.

Index

Constants

View Source
const Background int = -1

Background provides the z-index to represent a background image.

View Source
const Foreground int = 1

Foreground provides the z-index to represent a foreground image.

View Source
const Timeout int = 180

Timeout provides the maximum number of seconds WaitReady will wait for a meeting and user to be ready.

View Source
const WEBHOOK_RECORDING string = "recording_update"
View Source
const WEBHOOK_ROOM string = "room_update"
View Source
const WEBHOOK_SNAPSHOT string = "snapshot_update"

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioInsert added in v1.6.0

type AudioInsert struct {
	// Config specifies whether audio insertion is enabled, disabled, or audio-only.
	Config AudioInsertConfig
	// Position defines the visual position of the audio insert when enabled.
	// May be nil if no position is specified or for audio-only inserts.
	Position *AudioInsertPosition
}

AudioInsert contains configuration for inserting audio into a meeting.

type AudioInsertConfig added in v1.6.0

type AudioInsertConfig string

AudioInsertConfig defines the configuration options for audio insertion.

const (
	// Enabled indicates that audio insert is shown all the time.
	Enabled AudioInsertConfig = "enabled"
	// Disabled indicates that audio insert is turned off.
	Disabled AudioInsertConfig = "disabled"
	// AudioOnly indicates that the insert is only shown if the participant is not shown on the podium.
	AudioOnly AudioInsertConfig = "audio_only"
)

type AudioInsertPosition added in v1.6.0

type AudioInsertPosition struct {
	// X is the horizontal position coordinate.
	X int
	// Y is the vertical position coordinate.
	Y int
}

AudioInsertPosition represents the coordinates for positioning an audio insert visual element.

type Broadcast added in v1.3.0

type Broadcast struct {
	ID        string    `json:"id"`
	Platform  string    `json:"platform"`
	PlayerURL string    `json:"player_url"`
	User      EventUser `json:"user"`
	Room      EventRoom `json:"room"`
}

Broadcast contains information of a live-stream broadcast.

type BroadcastUpdate added in v1.3.0

type BroadcastUpdate struct {
	EventBase
	Broadcasts []Broadcast `json:"broadcasts"`
}

BroadcastUpdate event is sent whenever the live-stream broadcasts changes.

type Chat added in v1.3.0

type Chat struct {
	EventBase
	Content   string    `json:"content"`
	ClientID  string    `json:"cid"`
	UserID    string    `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
}

Chat contains a chat message.

type Client

type Client struct {
	BaseURL *url.URL

	Rooms    *RoomsService
	Webhook  *WebhookService
	Observer *ObserverService
	// contains filtered or unexported fields
}

Client provides methods to communicate with the eyeson API, starting video meetings, adapt configurations and send chat, images, presentations and videos to the meeting.

func NewClient

func NewClient(key string, options ...ClientOption) (*Client, error)

NewClient creates a new client in order to send requests to the eyeson API.

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error)

Do sends a request to the eyeson API and prepares the result from the received response.

func (*Client) NewPlainRequest added in v1.4.0

func (c *Client) NewPlainRequest(method, urlStr string, data *bytes.Buffer, contentType string) (*http.Request, error)

NewPlainRequest create a request with bytes and content-type

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, data url.Values) (*http.Request, error)

NewRequest prepares a request to be sent to the API.

func (*Client) UserClient

func (c *Client) UserClient() *Client

UserClient provides a client for user requests that use the session access key for authorization.

type ClientOption added in v1.2.4

type ClientOption func(*Client)

ClientOption interface to specify options for client

func WithCustomCAFile added in v1.2.4

func WithCustomCAFile(customCAFile string) ClientOption

WithCustomCAFile Set a custom CA file to be used instead of the system-poool CAs.

func WithCustomEndpoint added in v1.3.0

func WithCustomEndpoint(endpoint string) ClientOption

WithCustomEndpoint Set an endpoint which differs from the official api endpoint.

func WithInsecureSkipVerify added in v1.8.0

func WithInsecureSkipVerify() ClientOption

type CustomMessage added in v1.4.0

type CustomMessage struct {
	EventBase
	Content   string    `json:"content"`
	ClientID  string    `json:"cid"`
	UserID    string    `json:"user_id"`
	CreatedAt time.Time `json:"created_at"`
}

CustomMessage contains a custom message.

type EventBase added in v1.3.0

type EventBase struct {
	Type string `json:"type"`
}

EventBase Base for all events. Has only the type field.

func (*EventBase) GetType added in v1.3.0

func (msg *EventBase) GetType() string

GetType retrieve the type. Implements the EventInterface

type EventInterface added in v1.3.0

type EventInterface interface {
	GetType() string
}

EventInterface interface for all event-messages.

type EventRoom added in v1.3.0

type EventRoom struct {
	ID           string        `json:"id"`
	Name         string        `json:"name"`
	Ready        bool          `json:"ready"`
	StartedAt    time.Time     `json:"started_at"`
	Shutdown     bool          `json:"shutdown"`
	GuestToken   string        `json:"guest_token"`
	Options      Options       `json:"options"`
	Participants []Participant `json:"participants"`
	Broadcasts   []Broadcast   `json:"broadcasts"`
}

EventRoom represents the room.

type EventUser added in v1.3.0

type EventUser struct {
	ID       string    `json:"id"`
	Name     string    `json:"name"`
	Guest    bool      `json:"guest"`
	Avatar   string    `json:"avatar"`
	JoinedAt time.Time `json:"joined_at"`
}

EventUser represents an user within the event messages.

type GetRecordingsOptions added in v1.7.0

type GetRecordingsOptions struct {
	Page      *int
	StartedAt *time.Time
	Since     *time.Time
	Until     *time.Time
}

GetRecordingsOptions options supporting pagination and filtering.

type GetSnaphostsOptions added in v1.6.0

type GetSnaphostsOptions struct {
	Page      *int
	StartedAt *time.Time
	Since     *time.Time
	Until     *time.Time
}

GetSnaphostsOptions options supporting pagination and filtering.

type ImageType added in v1.4.0

type ImageType string

ImageType provides custom type for specifying image type

const (
	JPG  ImageType = "jpg"
	PNG  ImageType = "png"
	SVG  ImageType = "svg"
	WEBP ImageType = "webp"
)

List of supported image types

type LayerOptions added in v1.6.0

type LayerOptions struct {
	// ID specifies a custom identifier for the layer.
	ID string
}

LayerOptions provides options for setting a layer.

type Layout added in v1.6.0

type Layout string

Layout provides a custom type for specifying layout configuration.

const (
	// Auto Automatically sets layouts according to the number of participants
	Auto Layout = "auto"
	// Custom Maintains manually assigned positions.
	Custom Layout = "custom"
)

type LayoutMap added in v1.6.0

type LayoutMap struct {
	// Positions is a slice of participant position configurations.
	Positions []LayoutPos
}

LayoutMap contains the positions of participants in a custom layout configuration.

type LayoutObjectFit added in v1.6.0

type LayoutObjectFit string

LayoutObjectFit defines how content fits within its container in a layout.

const (
	// Cover scales the content to cover the entire container, potentially cropping some parts.
	Cover LayoutObjectFit = "cover"
	// Contain scales the content to fit within the container while maintaining aspect ratio.
	Contain LayoutObjectFit = "contain"
	// Autofit automatically determines the best fitting method for the content.
	Autofit LayoutObjectFit = "auto"
)

type LayoutPos added in v1.6.0

type LayoutPos struct {
	// X is the horizontal position coordinate.
	X int
	// Y is the vertical position coordinate.
	Y int
	// Width is the horizontal size of the position.
	Width int
	// Height is the vertical size of the position.
	Height int
	// ObjectFit determines how the participant's video fits within the assigned space.
	ObjectFit LayoutObjectFit
}

LayoutPos represents the position and dimensions of a participant in a layout.

type Links struct {
	Self     *string `json:"self"`
	Download *string `json:"download"`
}

Links holds a list of links for the corresponding resource.

type MediaType added in v1.4.0

type MediaType string

MediaType type for specifing medias

const (
	Audio MediaType = "audio"
	Video MediaType = "video"
)

MediaType constants

type ObserverService added in v1.3.0

type ObserverService service

ObserverService Service to listen and control a room.

func (*ObserverService) Connect added in v1.3.0

func (os *ObserverService) Connect(ctx context.Context, roomID string) (<-chan EventInterface, error)

Connect connects the observer and returns an eventInterface channel on success.

type Options added in v1.3.0

type Options struct {
	ShowNames bool `json:"show_names"`
}

Options Struct containing list of options of the room.

type OptionsUpdate added in v1.3.0

type OptionsUpdate struct {
	EventBase
	Options Options `json:"options"`
}

OptionsUpdate event is sent whenever an option parameter is modified or added via the rest-interface.

type Participant added in v1.3.0

type Participant struct {
	ID     string `json:"id"`
	RoomID string `json:"room_id"`
	Name   string `json:"name"`
	Guest  bool   `json:"guest"`
	Online bool   `json:"online"`
	Avatar string `json:"avatar"`
}

Participant holds informationof a participating user containing its online status.

type ParticipantUpdate added in v1.3.0

type ParticipantUpdate struct {
	EventBase
	Participant Participant `json:"participant"`
}

ParticipantUpdate event is sent whenever the list of participants changes.

type Playback added in v1.3.0

type Playback struct {
	URL    string `json:"url"`
	PlayID string `json:"play_id"`
	Audio  bool   `json:"audio"`
}

Playback represents a playback i.e. media inject into the confserver.

type PlaybackOptions added in v1.6.0

type PlaybackOptions struct {
	// ReplacedUserID is the ID of the user to be replaced by the playback.
	// If left empty, the playback is shown as a separate participant.
	ReplacedUserID string
	// PlayID is a custom identifier for the playback.
	PlayID string
	// Name is a display name for the playback.
	Name string
	// LoopCount specifies how many times the video should loop.
	// Default is 0 (play once).
	LoopCount int
	// Mute/Unmute video files
	Audio bool
}

PlaybackOptions options for starting a playback.

type PlaybackUpdate added in v1.3.0

type PlaybackUpdate struct {
	EventBase
	Playing []Playback `json:"playing"`
}

PlaybackUpdate Sent when a playback was started.

type PodiumPosition added in v1.3.0

type PodiumPosition struct {
	UserID string  `json:"user_id"`
	PlayID *string `json:"play_id"`
	Width  int     `json:"width"`
	Height int     `json:"height"`
	Left   int     `json:"left"`
	Top    int     `json:"top"`
	ZIndex int     `json:"z-index"`
}

PodiumPosition defines an area on the podium wich belongs to the specified user identified by its user-id.

type PodiumUpdate added in v1.3.0

type PodiumUpdate struct {
	EventBase
	Podium []PodiumPosition `json:"podium"`
}

PodiumUpdate event is sent whenever the podium layout or the positioning of participants changes.

type Recording added in v1.3.0

type Recording struct {
	ID string `json:"id"`
	// Unix timestamp
	CreatedAt int       `json:"created_at"`
	Duration  *int      `json:"duration"`
	Links     Links     `json:"links"`
	User      EventUser `json:"user"`
	Room      EventRoom `json:"room"`
}

Recording holds information on a recording.

type RecordingUpdate added in v1.3.0

type RecordingUpdate struct {
	EventBase
	Recording Recording `json:"recording"`
}

RecordingUpdate event is sent whenver recording is started or stopped.

type Room

type Room struct {
	ID         string `json:"id"`
	GuestToken string `json:"guest_token"`
	SIP        SIP    `json:"sip"`
	Shutdown   bool   `json:"shutdown"`
}

Room has attributes for SIP details and GuestToken

type RoomInfo added in v1.7.0

type RoomInfo struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Ready      bool   `json:"ready"`
	StartedAt  string `json:"started_at"`
	Shutdown   bool   `json:"shutdown"`
	GuestToken string `json:"guest_token"`
}

RoomInfo

type RoomLinks struct {
	Gui       string `json:"gui"`
	GuestJoin string `json:"guest_join"`
	Websocket string `json:"websocket"`
}

RoomLinks provide all public web URLs for a room.

type RoomOptions added in v1.4.0

type RoomOptions struct {
	Widescreen bool `json:"widescreen"`
}

type RoomResponse

type RoomResponse struct {
	AccessKey string      `json:"access_key"`
	Links     RoomLinks   `json:"links"`
	Room      Room        `json:"room"`
	User      User        `json:"user"`
	Ready     bool        `json:"ready"`
	Signaling Signaling   `json:"signaling"`
	Options   RoomOptions `json:"options"`
}

RoomResponse holds available attributes to a room.

func (*RoomResponse) GetAuthToken added in v1.2.1

func (rr *RoomResponse) GetAuthToken() string

GetAuthToken returns the JWT-Authtoken for authenticating to the sig-service.

func (*RoomResponse) GetClientID added in v1.2.1

func (rr *RoomResponse) GetClientID() string

GetClientID returns the client-id of this signaling entity.

func (*RoomResponse) GetConfID added in v1.2.1

func (rr *RoomResponse) GetConfID() string

GetConfID returns the conf-id to connect to.

func (*RoomResponse) GetDisplayname added in v1.2.1

func (rr *RoomResponse) GetDisplayname() string

func (*RoomResponse) GetSigEndpoint added in v1.2.1

func (rr *RoomResponse) GetSigEndpoint() string

GetSigEndpoint returns the signaling endpoint

func (*RoomResponse) GetStunServers added in v1.2.1

func (rr *RoomResponse) GetStunServers() []string

GetStunServers returns stun info

func (*RoomResponse) GetTurnServerPassword added in v1.2.1

func (rr *RoomResponse) GetTurnServerPassword() string

GetTurnServerPassword returns turn credentials

func (*RoomResponse) GetTurnServerURLs added in v1.2.1

func (rr *RoomResponse) GetTurnServerURLs() []string

GetTurnServerURLs returns turn info

func (*RoomResponse) GetTurnServerUsername added in v1.2.1

func (rr *RoomResponse) GetTurnServerUsername() string

GetTurnServerUsername return turn credentials

type RoomUpdate added in v1.3.0

type RoomUpdate struct {
	EventBase
	Content EventRoom `json:"content"`
}

RoomUpdate event is sent if any of the room properties is changed.

type RoomsService

type RoomsService service

RoomsService provides method Join to start and join a room.

func (*RoomsService) DeleteForward added in v1.4.0

func (srv *RoomsService) DeleteForward(id string, forwardID string) error

DeleteForward deletes a forward by its forwardID

func (*RoomsService) DeleteRecording added in v1.7.0

func (u *RoomsService) DeleteRecording(recordingID string) error

DeleteRecording deletes a recording.

func (*RoomsService) DeleteSnapshot added in v1.6.0

func (u *RoomsService) DeleteSnapshot(snapshotID string) error

DeleteSnapshot deletes a snapshot.

func (*RoomsService) ForwardSource added in v1.4.0

func (srv *RoomsService) ForwardSource(id string, forwardID string, userID string,
	mediaTypes []MediaType, destURL string) error

ForwardSource starts forwarding the userID media to the specified url.

func (*RoomsService) GetCurrentMeetings added in v1.7.0

func (srv *RoomsService) GetCurrentMeetings() (*[]RoomInfo, error)

func (*RoomsService) GetRecording added in v1.7.0

func (srv *RoomsService) GetRecording(recordingID string) (*Recording, error)

GetRecording retrieves a recording.

func (*RoomsService) GetRecordings added in v1.7.0

func (srv *RoomsService) GetRecordings(ID string, options *GetRecordingsOptions) (*[]Recording, error)

GetSnapshots retrieves a a list of recordings for a room.

func (*RoomsService) GetRoomUsers added in v1.7.0

func (srv *RoomsService) GetRoomUsers(ID string, online *bool) (*[]Participant, error)

func (*RoomsService) GetSnapshot added in v1.6.0

func (srv *RoomsService) GetSnapshot(snapshotID string) (*Snapshot, error)

GetSnapshot retrieves a snapshot.

func (*RoomsService) GetSnapshots added in v1.6.0

func (srv *RoomsService) GetSnapshots(ID string, options *GetSnaphostsOptions) (*[]Snapshot, error)

GetSnapshots retrieves a a list of snapshots for a room.

func (*RoomsService) GuestJoin added in v1.2.0

func (srv *RoomsService) GuestJoin(guestToken, id, name, avatar string) (*UserService, error)

GuestJoin creates a new guest user for an active meeting.

func (*RoomsService) Join

func (srv *RoomsService) Join(id string, user string, options map[string]string) (*UserService, error)

Join starts and joins a video meeting. The user string represents a unique identifier, to join as participant. If the same room identifier is provided the participants will join the same meeting. The room identifier can be omitted, the eyeson-api will therefor create a new room for every user joining.

func (*RoomsService) Shutdown added in v1.1.1

func (srv *RoomsService) Shutdown(id string) error

Shutdown force stops a running meeting.

type SIP

type SIP struct {
	URI               string `json:"uri"`
	Domain            string `json:"domain"`
	AuthorizationUser string `json:"authorizationUser"`
	Password          string `json:"password"`
	WSServers         string `json:"wsServers"`
	DisplayName       string `json:"displayName"`
}

SIP contains access details for the protocol used to establish a connection.

type SeppSignaling added in v1.2.1

type SeppSignaling struct {
	ClientID    string       `json:"client_id"`
	AuthToken   string       `json:"auth_token"`
	ConfID      string       `json:"conf_id"`
	Endpoint    string       `json:"endpoint"`
	StunServers []string     `json:"stun_servers"`
	TurnServer  []TurnServer `json:"turn_servers"`
}

SeppSignaling holds information required by the gosepp signaling interface.

type SetLayoutOptions added in v1.6.0

type SetLayoutOptions struct {
	// Users is a list of user IDs or empty strings for empty participant positions.
	Users []string
	// VoiceActivation determines if participants are actively replaced by voice detection.
	VoiceActivation bool
	// ShowNames determines if participant name overlays are shown. If not specified, defaults
	// to true.
	ShowNames *bool
	// LayoutName specifies an optional name for the layout configuration.
	LayoutName string
	// LayoutMap contains the custom positions of participants when using custom layout.
	LayoutMap *LayoutMap
	// AudioInsert contains configuration for audio insertion if required.
	AudioInsert *AudioInsert
}

SetLayoutOptions contains options for configuring a meeting layout.

type Signaling added in v1.2.1

type Signaling struct {
	Type    string        `json:"type"`
	SigSepp SeppSignaling `json:"options"`
}

Signaling base container for signaling options. So far only type "sepp" is allowed.

type Snapshot added in v1.3.0

type Snapshot struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Links     Links     `json:"links"`
	Creator   EventUser `json:"creator"`
	CreatedAt time.Time `json:"created_at"`
	Room      EventRoom `json:"room"`
}

Snapshot represents a snapshot

type SnapshotUpdate added in v1.3.0

type SnapshotUpdate struct {
	EventBase
	Snapshots []Snapshot `json:"snapshots"`
}

SnapshotUpdate fired whenever a new snapshot ist taken.

type TurnServer added in v1.2.1

type TurnServer struct {
	URLs     []string `json:"urls"`
	Username string   `json:"username"`
	Password string   `json:"password"`
}

TurnServer provides connection info for ICE-Servers

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	SIP  SIP    `json:"sip"`
}

User has information on the current participant that has joined the meeting.

type UserService

type UserService struct {
	Data *RoomResponse
	// contains filtered or unexported fields
}

UserService provides methods a user can perform.

func NewUserServiceFromAccessKey added in v1.5.0

func NewUserServiceFromAccessKey(accessKey string, options ...ClientOption) (*UserService, error)

NewUserServiceFromAccessKey Create a new UserService from an access-key.

func (*UserService) Chat

func (u *UserService) Chat(content string) error

Chat sends a chat message.

func (*UserService) ClearLayer

func (u *UserService) ClearLayer(zIndex int) error

ClearLayer clears a layer given by the z-index that should be set using the constants Foreground or Background.

func (*UserService) CreateSnapshot added in v1.6.0

func (u *UserService) CreateSnapshot() error

CreateSnapshot creates a new snapshot of the current meeting

func (*UserService) GetSnapshot added in v1.6.0

func (u *UserService) GetSnapshot(snapshotID string) (*Snapshot, error)

GetSnapshot Retrieves a snapshot from a running meeting.

func (*UserService) LockMeeting added in v1.6.0

func (u *UserService) LockMeeting() error

LockMeeting locks a meeting, dissalowing new participants from joining

func (*UserService) SendCustomMessage added in v1.6.0

func (u *UserService) SendCustomMessage(content string) error

SendCustomMessage sends a custom message to all participants in this meeting.

func (*UserService) SetLayer

func (u *UserService) SetLayer(imgURL string, zIndex int, options *LayerOptions) error

SetLayer sets a layer image using the given public available URL pointing to an image file. The z-index should be set using the constants Foreground or Background.

func (*UserService) SetLayerImage added in v1.4.0

func (u *UserService) SetLayerImage(imgData []byte, imageType ImageType, zIndex int,
	options *LayerOptions) error

SetLayerImage sets a layer image providing an image file. The z-index should be set using the constants Foreground or Background.

func (*UserService) SetLayout

func (u *UserService) SetLayout(layout Layout, options *SetLayoutOptions) error

SetLayout sets a participant podium layout where the layout is either "custom" or "auto". The users list is of user-ids or empty strings for empty participant positions. The flag voiceActivation replaces participants actively by voice detection. The flag showNames show or hides participant name overlays.

func (*UserService) StartBroadcast

func (u *UserService) StartBroadcast(streamURL string) error

StartBroadcast starts a broadcast to the given stream url given by a streaming service like YouTube, Vimeo, and others.

func (*UserService) StartPlayback

func (u *UserService) StartPlayback(playbackURL string, options *PlaybackOptions) error

StartPlayback starts a playback using the given public available URL to a video file. The given user id marks the position of the participant that is going to be replaced while the playback is shown. If replacedUserID is left empty the playback is shown as a separate participant of the meeting.

func (*UserService) StartRecording

func (u *UserService) StartRecording() error

StartRecording starts a recording.

func (*UserService) StopBroadcast

func (u *UserService) StopBroadcast() error

StopBroadcast stops a broadcast.

func (*UserService) StopMeeting

func (u *UserService) StopMeeting() error

StopMeeting stops a meeting for all participants.

func (*UserService) StopPlayback added in v1.6.0

func (u *UserService) StopPlayback(playID string) error

StopPlayback Stops a playback by its playID.

func (*UserService) StopRecording

func (u *UserService) StopRecording() error

StopRecording stops a recording.

func (*UserService) WaitReady

func (u *UserService) WaitReady() error

WaitReady waits until a meeting has successfully been started. It has a fixed polling interval of one second. WaitReady responds with an error on timeout or any communication problems.

type Webhook added in v1.1.0

type Webhook struct {
	Type      string `json:"type"`
	Recording struct {
		Id        string `json:"id"`
		Duration  int    `json:"duration"`
		CreatedAt int    `json:"created_at"`
		Links     struct {
			Download string `json:"download"`
		} `json:"links"`
		Room struct {
			Id string `json:"id"`
		}
	} `json:"recording,omitempty"`
	Room struct {
		Id        string    `json:"id"`
		Name      string    `json:"name"`
		StartedAt time.Time `json:"started_at"`
		Shutdown  bool      `json:"shutdown"`
	} `json:"room"`
	Snapshot struct {
		Id        string    `json:"id"`
		Name      string    `json:"name"`
		CreatedAt time.Time `json:"created_at"`
		Links     struct {
			Download string `json:"download"`
		} `json:"links"`
		Room struct {
			Id string `json:"id"`
		}
	} `json:"snapshot,omitempty"`
}

Webhook holds available attributes to a room.

func NewWebhook added in v1.2.0

func NewWebhook(apiKey string, r *http.Request) (*Webhook, error)

type WebhookDetails added in v1.1.0

type WebhookDetails struct {
	Id                string    `json:"id"`
	Url               string    `json:"url"`
	Types             []string  `json:"types"`
	LastRequestSentAt time.Time `json:"last_request_sent_at"`
	LastResponseCode  string    `json:"last_response_code"`
}

WebhookDetails provide configuration details.

type WebhookService added in v1.1.0

type WebhookService service

WebhookService provides method Register and Unregister a webhook.

func (*WebhookService) Get added in v1.1.0

func (srv *WebhookService) Get() (*WebhookDetails, error)

Get provides details about a registered webhook.

func (*WebhookService) Register added in v1.1.0

func (srv *WebhookService) Register(endpoint, types string) error

Register will assign an endpoint URL to the current ApiKey.

func (*WebhookService) Unregister added in v1.1.0

func (srv *WebhookService) Unregister() error

Unregister will clear the current webhook.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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