/
screenshare.go
36 lines (31 loc) · 1.28 KB
/
screenshare.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package gcloudcx
import (
"time"
"github.com/google/uuid"
)
// ScreenShare describes a Screen Share (like belonging to Participant)
type ScreenShare struct {
ID uuid.UUID `json:"id"`
State string `json:"state"` // alerting,dialing,contacting,offering,connected,disconnected,terminated,converting,uploading,transmitting,scheduled,none
Sharing bool `json:"sharing"`
Segments []Segment `json:"segments"`
PeerCount int `json:"peerCount"`
Provider string `json:"provider"`
PeerID uuid.UUID `json:"peerId"`
ConnectedTime time.Time `json:"connectedTime"`
DisconnectedTime time.Time `json:"disconnectedTime"`
StartAlertingTime time.Time `json:"startAlertingTime"`
DisconnectType string `json:"disconnectType"` // endpoint,client,system,transfer,timeout,transfer.conference,transfer.consult,transfer.forward,transfer.noanswer,transfer.notavailable,transport.failure,error,peer,other,spam,uncallable
}
// GetID gets the identifier of this
//
// implements Identifiable
func (screenShare ScreenShare) GetID() uuid.UUID {
return screenShare.ID
}
// String gets a string version
//
// implements the fmt.Stringer interface
func (screenShare ScreenShare) String() string {
return screenShare.ID.String()
}