-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_recording_webhook.go
123 lines (93 loc) · 3.3 KB
/
event_recording_webhook.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package sora
import (
"encoding/json"
"time"
)
// 2024.2.0 で廃止されます
type EventRecordingStartedWebhookRequest struct {
}
type EventRecordingStartedWebhookResponse struct {
}
type ArchiveStartedData struct {
RecordingID string `json:"recording_id"`
ChannelID string `json:"channel_id"`
SessionID string `json:"session_id"`
ClientID string `json:"client_id"`
BundleID string `json:"bundle_id"`
ConnectionID string `json:"connection_id"`
Audio bool `json:"audio"`
AudioCodecType string `json:"audio_codec_type"`
AudioBitRate *int32 `json:"audio_bit_rate"`
Video bool `json:"video"`
VideoCodecType string `json:"video_codec_type"`
VideoBitRate int32 `json:"video_bit_rate"`
VideoHeight int32 `json:"video_height"`
VideoWidth int32 `json:"video_width"`
// unix-time
StartTime int64 `json:"start_time"`
StartTimeOffset int64 `json:"start_time_offset"`
StartTimestamp time.Time `json:"start_timestamp"`
// unix-time
CreatedAt int64 `json:"created_at"`
}
type ArchiveAvailableData struct {
ArchiveStartedData
Filename string `json:"filename"`
FilePath string `json:"file_path"`
MetadataFilename string `json:"metadata_filename"`
MetadataFilePath string `json:"metadata_file_path"`
// unix-time
StopTime int64 `json:"stop_time"`
StopTimeOffset int64 `json:"stop_time_offset"`
StopTimestamp time.Time `json:"stop_timestamp"`
Size int64 `json:"size"`
Stats json.RawMessage `json:"stats"`
}
type SplitArchiveAvailableData struct {
ArchiveAvailableData
SplitIndex string `json:"split_index"`
}
type SplitArchiveEndData struct {
SplitLastIndex string `json:"split_last_index"`
RecordingID string `json:"recording_id"`
ChannelID string `json:"channel_id"`
SessionID string `json:"session_id"`
ClientID string `json:"client_id"`
BundleID string `json:"bundle_id"`
ConnectionID string `json:"connection_id"`
Audio bool `json:"audio"`
AudioCodecType string `json:"audio_codec_type"`
AudioBitRate *int32 `json:"audio_bit_rate"`
Video bool `json:"video"`
VideoCodecType string `json:"video_codec_type"`
VideoBitRate int32 `json:"video_bit_rate"`
Filename string `json:"filename"`
FilePath string `json:"file_path"`
// unix-time
StartTime int64 `json:"start_time"`
StartTimeOffset int64 `json:"start_time_offset"`
StartTimestamp time.Time `json:"start_timestamp"`
// unix-time
StopTime int64 `json:"stop_time"`
StopTimeOffset int64 `json:"stop_time_offset"`
StopTimestamp time.Time `json:"stop_timestamp"`
}
type ArchiveFailed struct {
RecordingID string `json:"recording_id"`
Audio bool `json:"audio"`
AudioCodecType string `json:"audio_codec_type"`
AudioBitRate *int32 `json:"audio_bit_rate"`
Video bool `json:"video"`
VideoCodecType string `json:"video_codec_type"`
VideoBitRate int32 `json:"video_bit_rate"`
Filename string `json:"filename"`
FilePath string `json:"file_path"`
// unix-time
StartTime int64 `json:"start_time"`
StartTimeOffset int64 `json:"start_time_offset"`
StartTimestamp time.Time `json:"start_timestamp"`
// unix-time
StopTime int64 `json:"stop_time"`
StopTimeOffset int64 `json:"stop_time_offset"`
StopTimestamp time.Time `json:"stop_timestamp"`
}