109 lines
4.4 KiB
Go
109 lines
4.4 KiB
Go
|
package gueststar
|
|||
|
|
|||
|
import "time"
|
|||
|
|
|||
|
type ChannelSettings struct {
|
|||
|
// Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot.
|
|||
|
IsModeratorSendLiveEnabled bool `json:"is_moderator_send_live_enabled"`
|
|||
|
|
|||
|
// Number of slots the Guest Star call interface will allow the host to add to a call. Required to be between 1 and 6.
|
|||
|
SlotCount int `json:"slot_count"`
|
|||
|
|
|||
|
// Flag determining if Browser Sources subscribed to sessions on this channel should output audio
|
|||
|
IsBrowserSourceAudioEnabled bool `json:"is_browser_source_audio_enabled"`
|
|||
|
|
|||
|
// This setting determines how the guests within a session should be laid out within the browser source. Can be one of the following values:
|
|||
|
//
|
|||
|
// TILED_LAYOUT: All live guests are tiled within the browser source with the same size.
|
|||
|
//
|
|||
|
// SCREENSHARE_LAYOUT: All live guests are tiled within the browser source with the same size.
|
|||
|
// If there is an active screen share, it is sized larger than the other guests.
|
|||
|
GroupLayout string `json:"group_layout"`
|
|||
|
|
|||
|
// View only token to generate browser source URLs
|
|||
|
BrowserSourceToken string `json:"browser_source_token"`
|
|||
|
}
|
|||
|
|
|||
|
type Session struct {
|
|||
|
// ID uniquely representing the Guest Star session.
|
|||
|
ID string `json:"id"`
|
|||
|
|
|||
|
// List of guests currently interacting with the Guest Star session.
|
|||
|
Guests []Guest `json:"guests"`
|
|||
|
}
|
|||
|
|
|||
|
type Guest struct {
|
|||
|
// ID representing this guest’s slot assignment.
|
|||
|
//
|
|||
|
// Host is always in slot "0"
|
|||
|
// Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc)
|
|||
|
// Screen Share is represented as a special guest with the ID "SCREENSHARE"
|
|||
|
// The identifier here matches the ID referenced in browser source links used in broadcasting software.
|
|||
|
SlotID string `json:"slot_id"`
|
|||
|
|
|||
|
// Flag determining whether or not the guest is visible in the browser source in the host’s streaming software.
|
|||
|
IsLive bool `json:"is_live"`
|
|||
|
|
|||
|
// User ID of the guest assigned to this slot.
|
|||
|
UserID string `json:"user_id"`
|
|||
|
|
|||
|
// Display name of the guest assigned to this slot.
|
|||
|
UserDisplayName string `json:"user_display_name"`
|
|||
|
|
|||
|
// Login of the guest assigned to this slot.
|
|||
|
UserLogin string `json:"user_login"`
|
|||
|
|
|||
|
// Value from 0 to 100 representing the host’s volume setting for this guest.
|
|||
|
Volume int `json:"volume"`
|
|||
|
|
|||
|
// Timestamp when this guest was assigned a slot in the session.
|
|||
|
AssignedAt time.Time `json:"assigned_at"`
|
|||
|
|
|||
|
// Information about the guest’s audio settings
|
|||
|
AudioSettings MediaSettings `json:"audio_settings"`
|
|||
|
|
|||
|
// Information about the guest’s video settings
|
|||
|
VideoSettings MediaSettings `json:"video_settings"`
|
|||
|
}
|
|||
|
|
|||
|
type MediaSettings struct {
|
|||
|
// Flag determining whether the host is allowing the guest’s audio to be seen or heard within the session.
|
|||
|
IsHostEnabled bool `json:"is_host_enabled"`
|
|||
|
|
|||
|
// Flag determining whether the guest is allowing their audio to be transmitted to the session.
|
|||
|
IsGuestEnabled bool `json:"is_guest_enabled"`
|
|||
|
|
|||
|
// Flag determining whether the guest has an appropriate audio device available to be transmitted to the session.
|
|||
|
IsAvailable bool `json:"is_available"`
|
|||
|
}
|
|||
|
|
|||
|
type Invite struct {
|
|||
|
// Twitch User ID corresponding to the invited guest
|
|||
|
UserID string `json:"user_id"`
|
|||
|
|
|||
|
// Timestamp when this user was invited to the session.
|
|||
|
InvitedAt time.Time `json:"invited_at"`
|
|||
|
|
|||
|
// Status representing the invited user’s join state. Can be one of the following:
|
|||
|
//
|
|||
|
// INVITED: The user has been invited to the session but has not acknowledged it.
|
|||
|
//
|
|||
|
// ACCEPTED: The invited user has acknowledged the invite and joined the waiting room,
|
|||
|
// but may still be setting up their media devices or otherwise preparing to join the call.
|
|||
|
//
|
|||
|
// READY: The invited user has signaled they are ready to join the call from the waiting room.
|
|||
|
Status string `json:"status"`
|
|||
|
|
|||
|
// Flag signaling that the invited user has chosen to disable their local video device. The user has hidden themselves, but they may choose to reveal their video feed upon joining the session.
|
|||
|
IsVideoEnabled bool `json:"is_video_enabled"`
|
|||
|
|
|||
|
// Flag signaling that the invited user has chosen to disable their local audio device. The user has muted themselves, but they may choose to unmute their audio feed upon joining the session.
|
|||
|
IsAudioEnabled bool `json:"is_audio_enabled"`
|
|||
|
|
|||
|
// Flag signaling that the invited user has a video device available for sharing.
|
|||
|
IsVideoAvailable bool `json:"is_video_available"`
|
|||
|
|
|||
|
// Flag signaling that the invited user has an audio device available for sharing.
|
|||
|
IsAudioAvailable bool `json:"is_audio_available"`
|
|||
|
}
|