livekit-server-sdk 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df7cb873ae1dd034d26f58d9d678aeb0685aeb76aa582efe03c57aa662090388
4
- data.tar.gz: decdabaf87c8f3eb04e7c30371482bc84bf93dc304c5b43581dcfaf8eb61485c
3
+ metadata.gz: 5eef78517d0f95246b2b76f12768eb22f556b44fb3cd2c2fee731e9ee302e623
4
+ data.tar.gz: 34bfd7e878f6f1a413c5ad22e060c92aa7c8026f5235710637df87240d9ab176
5
5
  SHA512:
6
- metadata.gz: e9c750d3c53fe896219fd80ef30435839af5c806a80407d17a6536aaa9106e0f300f9db8fdab1a03cb730794db927173fd8a26959a60bebab22a3147a12c8e2b
7
- data.tar.gz: 20d6ee54faa5ad39c4155d1d5d62906926c5222e1a40ca1346c7a2ef6e15f6ade65eb54ea08d0e4303c3018b5b8e814b8e763d4211e6a1d35749799432ffe10d
6
+ metadata.gz: 6acc80ab3108cb089962a3559b6361dd1143d63ebe12088bf4fb12dc58bf99522355d6fe16f844b28c805a0a71296c08334319c06188c5b9e0b855f6dfcb61aa
7
+ data.tar.gz: 6bd9016ec045247a5549090b7600d3424325cad853e9e77721d24255c95556a5ba6a87c4cd2989400a7907af3903572798af0d30e1d93b00450940899a78623d
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ /.idea/
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.8
1
+ 3.1.2
data/Gemfile.lock CHANGED
@@ -1,66 +1,49 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- livekit-server-sdk (0.3.0)
5
- google-protobuf (~> 3.21.0)
6
- jwt (~> 2.2.3)
7
- twirp (~> 1.9.0)
4
+ livekit-server-sdk (0.4.0)
5
+ google-protobuf (>= 3.21.0, < 4.0)
6
+ jwt (>= 2.2.3, < 3.0)
7
+ rack (>= 2.2.3)
8
+ twirp (>= 1.10.0, < 2.0)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
11
12
  specs:
12
13
  coderay (1.1.3)
13
14
  diff-lcs (1.5.0)
14
- faraday (1.10.0)
15
- faraday-em_http (~> 1.0)
16
- faraday-em_synchrony (~> 1.0)
17
- faraday-excon (~> 1.1)
18
- faraday-httpclient (~> 1.0)
19
- faraday-multipart (~> 1.0)
20
- faraday-net_http (~> 1.0)
21
- faraday-net_http_persistent (~> 1.0)
22
- faraday-patron (~> 1.0)
23
- faraday-rack (~> 1.0)
24
- faraday-retry (~> 1.0)
15
+ faraday (2.7.4)
16
+ faraday-net_http (>= 2.0, < 3.1)
25
17
  ruby2_keywords (>= 0.0.4)
26
- faraday-em_http (1.0.0)
27
- faraday-em_synchrony (1.0.0)
28
- faraday-excon (1.1.0)
29
- faraday-httpclient (1.0.1)
30
- faraday-multipart (1.0.4)
31
- multipart-post (~> 2)
32
- faraday-net_http (1.0.1)
33
- faraday-net_http_persistent (1.2.0)
34
- faraday-patron (1.0.0)
35
- faraday-rack (1.0.0)
36
- faraday-retry (1.0.3)
37
- google-protobuf (3.21.1)
38
- jwt (2.2.3)
18
+ faraday-net_http (3.0.2)
19
+ google-protobuf (3.21.12)
20
+ google-protobuf (3.21.12-x86_64-linux)
21
+ jwt (2.7.0)
39
22
  method_source (1.0.0)
40
- multipart-post (2.2.3)
41
- pry (0.14.1)
23
+ pry (0.14.2)
42
24
  coderay (~> 1.1)
43
25
  method_source (~> 1.0)
44
- pry-doc (1.3.0)
26
+ pry-doc (1.4.0)
45
27
  pry (~> 0.11)
46
28
  yard (~> 0.9.11)
29
+ rack (3.0.4.1)
47
30
  rake (13.0.6)
48
- rspec (3.11.0)
49
- rspec-core (~> 3.11.0)
50
- rspec-expectations (~> 3.11.0)
51
- rspec-mocks (~> 3.11.0)
52
- rspec-core (3.11.0)
53
- rspec-support (~> 3.11.0)
54
- rspec-expectations (3.11.0)
31
+ rspec (3.12.0)
32
+ rspec-core (~> 3.12.0)
33
+ rspec-expectations (~> 3.12.0)
34
+ rspec-mocks (~> 3.12.0)
35
+ rspec-core (3.12.1)
36
+ rspec-support (~> 3.12.0)
37
+ rspec-expectations (3.12.2)
55
38
  diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.11.0)
57
- rspec-mocks (3.11.1)
39
+ rspec-support (~> 3.12.0)
40
+ rspec-mocks (3.12.3)
58
41
  diff-lcs (>= 1.2.0, < 2.0)
59
- rspec-support (~> 3.11.0)
60
- rspec-support (3.11.0)
42
+ rspec-support (~> 3.12.0)
43
+ rspec-support (3.12.0)
61
44
  ruby2_keywords (0.0.5)
62
- twirp (1.9.0)
63
- faraday (< 2)
45
+ twirp (1.10.0)
46
+ faraday (< 3)
64
47
  google-protobuf (~> 3.0, >= 3.7.0)
65
48
  webrick (1.7.0)
66
49
  yard (0.9.28)
@@ -79,4 +62,4 @@ DEPENDENCIES
79
62
  yard
80
63
 
81
64
  BUNDLED WITH
82
- 2.3.4
65
+ 2.3.7
data/Rakefile CHANGED
@@ -13,6 +13,7 @@ task :proto do
13
13
  "--twirp_ruby_out=lib/livekit/proto",
14
14
  "-Iprotocol",
15
15
  "./protocol/livekit_egress.proto",
16
+ "./protocol/livekit_ingress.proto",
16
17
  "./protocol/livekit_models.proto",
17
18
  "./protocol/livekit_room.proto",
18
19
  "./protocol/livekit_webhook.proto")
@@ -15,7 +15,7 @@ module LiveKit
15
15
 
16
16
  def start_room_composite_egress(
17
17
  room_name,
18
- # one of EncodedFileOutput or StreamOutput
18
+ # one of EncodedFileOutput, SegmentedFileOutput or StreamOutput
19
19
  output,
20
20
  # EncodingOptionsPreset, only one of preset or advanced could be set
21
21
  preset: nil,
@@ -49,7 +49,7 @@ module LiveKit
49
49
 
50
50
  def start_track_composite_egress(
51
51
  room_name,
52
- # one of EncodedFileOutput or StreamOutput
52
+ # one of EncodedFileOutput, SegmentedFileOutput or StreamOutput
53
53
  output,
54
54
  # TrackID of an audio track
55
55
  audio_track_id: nil,
@@ -97,6 +97,33 @@ module LiveKit
97
97
  )
98
98
  end
99
99
 
100
+ def start_web_egress(
101
+ url,
102
+ # one of EncodedFileOutput, SegmentedFileOutput or StreamOutput
103
+ output,
104
+ # EncodingOptionsPreset, only one of preset or advanced could be set
105
+ preset: nil,
106
+ # EncodingOptions, only one of preset or advanced could be set
107
+ advanced: nil,
108
+ # true to record only audio
109
+ audio_only: false,
110
+ # true to record only video
111
+ video_only: false
112
+ )
113
+ request = Proto::WebEgressRequest.new(
114
+ url: url,
115
+ preset: preset,
116
+ advanced: advanced,
117
+ audio_only: audio_only,
118
+ video_only: video_only,
119
+ )
120
+ self.set_output(request, output)
121
+ self.rpc(
122
+ :StartWebEgress,
123
+ request,
124
+ headers: auth_header(roomRecord: true),
125
+ )
126
+ end
100
127
 
101
128
  def update_layout(egress_id, layout)
102
129
  self.rpc(
@@ -148,8 +175,10 @@ module LiveKit
148
175
  if output.nil?
149
176
  raise "output cannot be nil"
150
177
  end
151
- if output.filepath
178
+ if output.is_a? LiveKit::Proto::EncodedFileOutput or output.is_a? LiveKit::Proto::DirectFileOutput
152
179
  request.file = output
180
+ elsif output.is_a? LiveKit::Proto::SegmentedFileOutput
181
+ request.segments = output
153
182
  else
154
183
  request.stream = output
155
184
  end
@@ -34,7 +34,8 @@ module LiveKit
34
34
 
35
35
  class VideoGrant
36
36
  attr_accessor :roomCreate, :roomJoin, :roomList, :roomRecord, :roomAdmin,
37
- :room, :canPublish, :canSubscribe, :canPublishData, :hidden, :recorder
37
+ :room, :canPublish, :canSubscribe, :canPublishData, :hidden, :recorder,
38
+ :ingressAdmin
38
39
 
39
40
  def initialize(
40
41
  # true if can create or delete rooms
@@ -58,7 +59,9 @@ module LiveKit
58
59
  # if participant should remain invisible to others
59
60
  hidden: nil,
60
61
  # if participant is recording the room
61
- recorder: nil
62
+ recorder: nil,
63
+ # can create and manage Ingress
64
+ ingressAdmin: nil
62
65
  )
63
66
  @roomCreate = roomCreate
64
67
  @roomJoin = roomJoin
@@ -71,6 +74,7 @@ module LiveKit
71
74
  @canPublishData = canPublishData
72
75
  @hidden = hidden
73
76
  @recorder = recorder
77
+ @ingressAdmin = ingressAdmin
74
78
  end
75
79
 
76
80
  def self.from_hash(hash)
@@ -90,6 +94,7 @@ module LiveKit
90
94
  canPublishData: hash["canPublishData"],
91
95
  hidden: hash["hidden"],
92
96
  recorder: hash["recorder"],
97
+ ingressAdmin: hash["ingressAdmin"]
93
98
  )
94
99
  end
95
100
 
@@ -0,0 +1,101 @@
1
+ require "livekit/proto/livekit_ingress_twirp"
2
+ require "livekit/auth_mixin"
3
+
4
+ module LiveKit
5
+ class IngressServiceClient < Twirp::Client
6
+ client_for Proto::IngressService
7
+ include AuthMixin
8
+ attr_accessor :api_key, :api_secret
9
+
10
+ def initialize(base_url, api_key: nil, api_secret: nil)
11
+ super(File.join(base_url, "/twirp"))
12
+ @api_key = api_key
13
+ @api_secret = api_secret
14
+ end
15
+
16
+ def create_ingress(
17
+ # currently :RTMP_INPUT is the only supported type
18
+ input_type,
19
+ # optional, name to identify the ingress
20
+ name: nil,
21
+ # optional, you can attach to a room at a later time
22
+ room_name: nil,
23
+ # optional, identity of participant to publish as
24
+ participant_identity: nil,
25
+ # optional, display name of participant
26
+ participant_name: nil,
27
+ # optional, LiveKit::Proto::IngressAudioOptions
28
+ audio: nil,
29
+ # optional, LiveKit::Proto::IngressVideoOptions
30
+ video: nil
31
+ )
32
+ request = Proto::CreateIngressRequest.new(
33
+ input_type: input_type,
34
+ name: name,
35
+ room_name: room_name,
36
+ participant_identity: participant_identity,
37
+ participant_name: participant_name,
38
+ audio: audio,
39
+ video: video,
40
+ )
41
+ self.rpc(
42
+ :CreateIngress,
43
+ request,
44
+ headers: auth_header(ingressAdmin: true),
45
+ )
46
+ end
47
+
48
+ def update_ingress(
49
+ ingress_id,
50
+ # optional, name to identify the ingress
51
+ name: nil,
52
+ # optional, you can attach to a room at a later time
53
+ room_name: nil,
54
+ # optional, identity of participant to publish as
55
+ participant_identity: nil,
56
+ # optional, display name of participant
57
+ participant_name: nil,
58
+ # optional, LiveKit::Proto::IngressAudioOptions
59
+ audio: nil,
60
+ # optional, LiveKit::Proto::IngressVideoOptions
61
+ video: nil
62
+ )
63
+ request = Proto::UpdateIngressRequest.new(
64
+ ingress_id: ingress_id,
65
+ name: name,
66
+ room_name: room_name,
67
+ participant_identity: participant_identity,
68
+ participant_name: participant_name,
69
+ audio: audio,
70
+ video: video,
71
+ )
72
+ self.rpc(
73
+ :UpdateIngress,
74
+ request,
75
+ headers: auth_header(ingressAdmin: true),
76
+ )
77
+ end
78
+
79
+ def list_ingress(room_name: nil)
80
+ request = Proto::ListIngressRequest.new(
81
+ room_name: room_name,
82
+ )
83
+ self.rpc(
84
+ :ListIngress,
85
+ request,
86
+ headers: auth_header(ingressAdmin: true),
87
+ )
88
+ end
89
+
90
+ def delete_ingress(ingress_id)
91
+ request = Proto::DeleteIngressRequest.new(
92
+ ingress_id: ingress_id
93
+ )
94
+ self.rpc(
95
+ :DeleteIngress,
96
+ request,
97
+ headers: auth_header(ingressAdmin: true),
98
+ )
99
+ end
100
+ end
101
+ end
@@ -11,6 +11,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  optional :audio_only, :bool, 3
12
12
  optional :video_only, :bool, 4
13
13
  optional :custom_base_url, :string, 5
14
+ repeated :file_outputs, :message, 11, "livekit.EncodedFileOutput"
15
+ repeated :stream_outputs, :message, 12, "livekit.StreamOutput"
16
+ repeated :segment_outputs, :message, 13, "livekit.SegmentedFileOutput"
14
17
  oneof :output do
15
18
  optional :file, :message, 6, "livekit.EncodedFileOutput"
16
19
  optional :stream, :message, 7, "livekit.StreamOutput"
@@ -21,10 +24,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
21
24
  optional :advanced, :message, 9, "livekit.EncodingOptions"
22
25
  end
23
26
  end
27
+ add_message "livekit.WebEgressRequest" do
28
+ optional :url, :string, 1
29
+ optional :audio_only, :bool, 2
30
+ optional :video_only, :bool, 3
31
+ repeated :file_outputs, :message, 9, "livekit.EncodedFileOutput"
32
+ repeated :stream_outputs, :message, 10, "livekit.StreamOutput"
33
+ repeated :segment_outputs, :message, 11, "livekit.SegmentedFileOutput"
34
+ oneof :output do
35
+ optional :file, :message, 4, "livekit.EncodedFileOutput"
36
+ optional :stream, :message, 5, "livekit.StreamOutput"
37
+ optional :segments, :message, 6, "livekit.SegmentedFileOutput"
38
+ end
39
+ oneof :options do
40
+ optional :preset, :enum, 7, "livekit.EncodingOptionsPreset"
41
+ optional :advanced, :message, 8, "livekit.EncodingOptions"
42
+ end
43
+ end
24
44
  add_message "livekit.TrackCompositeEgressRequest" do
25
45
  optional :room_name, :string, 1
26
46
  optional :audio_track_id, :string, 2
27
47
  optional :video_track_id, :string, 3
48
+ repeated :file_outputs, :message, 11, "livekit.EncodedFileOutput"
49
+ repeated :stream_outputs, :message, 12, "livekit.StreamOutput"
50
+ repeated :segment_outputs, :message, 13, "livekit.SegmentedFileOutput"
28
51
  oneof :output do
29
52
  optional :file, :message, 4, "livekit.EncodedFileOutput"
30
53
  optional :stream, :message, 5, "livekit.StreamOutput"
@@ -46,10 +69,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
46
69
  add_message "livekit.EncodedFileOutput" do
47
70
  optional :file_type, :enum, 1, "livekit.EncodedFileType"
48
71
  optional :filepath, :string, 2
72
+ optional :disable_manifest, :bool, 6
49
73
  oneof :output do
50
74
  optional :s3, :message, 3, "livekit.S3Upload"
51
75
  optional :gcp, :message, 4, "livekit.GCPUpload"
52
76
  optional :azure, :message, 5, "livekit.AzureBlobUpload"
77
+ optional :aliOSS, :message, 7, "livekit.AliOSSUpload"
53
78
  end
54
79
  end
55
80
  add_message "livekit.SegmentedFileOutput" do
@@ -57,18 +82,22 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
57
82
  optional :filename_prefix, :string, 2
58
83
  optional :playlist_name, :string, 3
59
84
  optional :segment_duration, :uint32, 4
85
+ optional :disable_manifest, :bool, 8
60
86
  oneof :output do
61
87
  optional :s3, :message, 5, "livekit.S3Upload"
62
88
  optional :gcp, :message, 6, "livekit.GCPUpload"
63
89
  optional :azure, :message, 7, "livekit.AzureBlobUpload"
90
+ optional :aliOSS, :message, 9, "livekit.AliOSSUpload"
64
91
  end
65
92
  end
66
93
  add_message "livekit.DirectFileOutput" do
67
94
  optional :filepath, :string, 1
95
+ optional :disable_manifest, :bool, 5
68
96
  oneof :output do
69
97
  optional :s3, :message, 2, "livekit.S3Upload"
70
98
  optional :gcp, :message, 3, "livekit.GCPUpload"
71
99
  optional :azure, :message, 4, "livekit.AzureBlobUpload"
100
+ optional :aliOSS, :message, 6, "livekit.AliOSSUpload"
72
101
  end
73
102
  end
74
103
  add_message "livekit.S3Upload" do
@@ -77,6 +106,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
77
106
  optional :region, :string, 3
78
107
  optional :endpoint, :string, 4
79
108
  optional :bucket, :string, 5
109
+ optional :force_path_style, :bool, 6
110
+ map :metadata, :string, :string, 7
111
+ optional :tagging, :string, 8
80
112
  end
81
113
  add_message "livekit.GCPUpload" do
82
114
  optional :credentials, :bytes, 1
@@ -87,6 +119,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
87
119
  optional :account_key, :string, 2
88
120
  optional :container_name, :string, 3
89
121
  end
122
+ add_message "livekit.AliOSSUpload" do
123
+ optional :access_key, :string, 1
124
+ optional :secret, :string, 2
125
+ optional :region, :string, 3
126
+ optional :endpoint, :string, 4
127
+ optional :bucket, :string, 5
128
+ end
90
129
  add_message "livekit.StreamOutput" do
91
130
  optional :protocol, :enum, 1, "livekit.StreamProtocol"
92
131
  repeated :urls, :string, 2
@@ -101,6 +140,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
101
140
  optional :audio_frequency, :int32, 7
102
141
  optional :video_codec, :enum, 8, "livekit.VideoCodec"
103
142
  optional :video_bitrate, :int32, 9
143
+ optional :key_frame_interval, :double, 10
104
144
  end
105
145
  add_message "livekit.UpdateLayoutRequest" do
106
146
  optional :egress_id, :string, 1
@@ -113,6 +153,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
113
153
  end
114
154
  add_message "livekit.ListEgressRequest" do
115
155
  optional :room_name, :string, 1
156
+ optional :egress_id, :string, 2
116
157
  end
117
158
  add_message "livekit.ListEgressResponse" do
118
159
  repeated :items, :message, 1, "livekit.EgressInfo"
@@ -123,14 +164,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
123
164
  add_message "livekit.EgressInfo" do
124
165
  optional :egress_id, :string, 1
125
166
  optional :room_id, :string, 2
167
+ optional :room_name, :string, 13
126
168
  optional :status, :enum, 3, "livekit.EgressStatus"
127
169
  optional :started_at, :int64, 10
128
170
  optional :ended_at, :int64, 11
129
171
  optional :error, :string, 9
172
+ repeated :stream_results, :message, 15, "livekit.StreamInfo"
173
+ repeated :file_results, :message, 16, "livekit.FileInfo"
174
+ repeated :segment_results, :message, 17, "livekit.SegmentsInfo"
130
175
  oneof :request do
131
176
  optional :room_composite, :message, 4, "livekit.RoomCompositeEgressRequest"
132
177
  optional :track_composite, :message, 5, "livekit.TrackCompositeEgressRequest"
133
178
  optional :track, :message, 6, "livekit.TrackEgressRequest"
179
+ optional :web, :message, 14, "livekit.WebEgressRequest"
134
180
  end
135
181
  oneof :result do
136
182
  optional :stream, :message, 7, "livekit.StreamInfoList"
@@ -143,10 +189,21 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
143
189
  end
144
190
  add_message "livekit.StreamInfo" do
145
191
  optional :url, :string, 1
192
+ optional :started_at, :int64, 2
193
+ optional :ended_at, :int64, 3
146
194
  optional :duration, :int64, 4
195
+ optional :status, :enum, 5, "livekit.StreamInfo.Status"
196
+ optional :error, :string, 6
197
+ end
198
+ add_enum "livekit.StreamInfo.Status" do
199
+ value :ACTIVE, 0
200
+ value :FINISHED, 1
201
+ value :FAILED, 2
147
202
  end
148
203
  add_message "livekit.FileInfo" do
149
204
  optional :filename, :string, 1
205
+ optional :started_at, :int64, 2
206
+ optional :ended_at, :int64, 3
150
207
  optional :duration, :int64, 6
151
208
  optional :size, :int64, 4
152
209
  optional :location, :string, 5
@@ -157,20 +214,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
157
214
  optional :size, :int64, 3
158
215
  optional :playlist_location, :string, 4
159
216
  optional :segment_count, :int64, 5
217
+ optional :started_at, :int64, 6
218
+ optional :ended_at, :int64, 7
219
+ end
220
+ add_message "livekit.AutoTrackEgress" do
221
+ optional :filepath, :string, 1
222
+ optional :disable_manifest, :bool, 5
223
+ oneof :output do
224
+ optional :s3, :message, 2, "livekit.S3Upload"
225
+ optional :gcp, :message, 3, "livekit.GCPUpload"
226
+ optional :azure, :message, 4, "livekit.AzureBlobUpload"
227
+ end
160
228
  end
161
229
  add_enum "livekit.EncodedFileType" do
162
230
  value :DEFAULT_FILETYPE, 0
163
231
  value :MP4, 1
164
232
  value :OGG, 2
165
233
  end
166
- add_enum "livekit.StreamProtocol" do
167
- value :DEFAULT_PROTOCOL, 0
168
- value :RTMP, 1
169
- end
170
234
  add_enum "livekit.SegmentedFileProtocol" do
171
235
  value :DEFAULT_SEGMENTED_FILE_PROTOCOL, 0
172
236
  value :HLS_PROTOCOL, 1
173
237
  end
238
+ add_enum "livekit.StreamProtocol" do
239
+ value :DEFAULT_PROTOCOL, 0
240
+ value :RTMP, 1
241
+ end
174
242
  add_enum "livekit.AudioCodec" do
175
243
  value :DEFAULT_AC, 0
176
244
  value :OPUS, 1
@@ -187,6 +255,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
187
255
  value :H264_720P_60, 1
188
256
  value :H264_1080P_30, 2
189
257
  value :H264_1080P_60, 3
258
+ value :PORTRAIT_H264_720P_30, 4
259
+ value :PORTRAIT_H264_720P_60, 5
260
+ value :PORTRAIT_H264_1080P_30, 6
261
+ value :PORTRAIT_H264_1080P_60, 7
190
262
  end
191
263
  add_enum "livekit.EgressStatus" do
192
264
  value :EGRESS_STARTING, 0
@@ -195,6 +267,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
195
267
  value :EGRESS_COMPLETE, 3
196
268
  value :EGRESS_FAILED, 4
197
269
  value :EGRESS_ABORTED, 5
270
+ value :EGRESS_LIMIT_REACHED, 6
198
271
  end
199
272
  end
200
273
  end
@@ -202,6 +275,7 @@ end
202
275
  module LiveKit
203
276
  module Proto
204
277
  RoomCompositeEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.RoomCompositeEgressRequest").msgclass
278
+ WebEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.WebEgressRequest").msgclass
205
279
  TrackCompositeEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackCompositeEgressRequest").msgclass
206
280
  TrackEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackEgressRequest").msgclass
207
281
  EncodedFileOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodedFileOutput").msgclass
@@ -210,6 +284,7 @@ module LiveKit
210
284
  S3Upload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.S3Upload").msgclass
211
285
  GCPUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.GCPUpload").msgclass
212
286
  AzureBlobUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AzureBlobUpload").msgclass
287
+ AliOSSUpload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AliOSSUpload").msgclass
213
288
  StreamOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamOutput").msgclass
214
289
  EncodingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodingOptions").msgclass
215
290
  UpdateLayoutRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.UpdateLayoutRequest").msgclass
@@ -220,11 +295,13 @@ module LiveKit
220
295
  EgressInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EgressInfo").msgclass
221
296
  StreamInfoList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamInfoList").msgclass
222
297
  StreamInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamInfo").msgclass
298
+ StreamInfo::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamInfo.Status").enummodule
223
299
  FileInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.FileInfo").msgclass
224
300
  SegmentsInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentsInfo").msgclass
301
+ AutoTrackEgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AutoTrackEgress").msgclass
225
302
  EncodedFileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodedFileType").enummodule
226
- StreamProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamProtocol").enummodule
227
303
  SegmentedFileProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentedFileProtocol").enummodule
304
+ StreamProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamProtocol").enummodule
228
305
  AudioCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AudioCodec").enummodule
229
306
  VideoCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoCodec").enummodule
230
307
  EncodingOptionsPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodingOptionsPreset").enummodule
@@ -10,6 +10,7 @@ module LiveKit
10
10
  rpc :StartRoomCompositeEgress, RoomCompositeEgressRequest, EgressInfo, :ruby_method => :start_room_composite_egress
11
11
  rpc :StartTrackCompositeEgress, TrackCompositeEgressRequest, EgressInfo, :ruby_method => :start_track_composite_egress
12
12
  rpc :StartTrackEgress, TrackEgressRequest, EgressInfo, :ruby_method => :start_track_egress
13
+ rpc :StartWebEgress, WebEgressRequest, EgressInfo, :ruby_method => :start_web_egress
13
14
  rpc :UpdateLayout, UpdateLayoutRequest, EgressInfo, :ruby_method => :update_layout
14
15
  rpc :UpdateStream, UpdateStreamRequest, EgressInfo, :ruby_method => :update_stream
15
16
  rpc :ListEgress, ListEgressRequest, ListEgressResponse, :ruby_method => :list_egress
@@ -0,0 +1,114 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: livekit_ingress.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'livekit_models_pb'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("livekit_ingress.proto", :syntax => :proto3) do
10
+ add_message "livekit.CreateIngressRequest" do
11
+ optional :input_type, :enum, 1, "livekit.IngressInput"
12
+ optional :name, :string, 2
13
+ optional :room_name, :string, 3
14
+ optional :participant_identity, :string, 4
15
+ optional :participant_name, :string, 5
16
+ optional :audio, :message, 6, "livekit.IngressAudioOptions"
17
+ optional :video, :message, 7, "livekit.IngressVideoOptions"
18
+ end
19
+ add_message "livekit.IngressAudioOptions" do
20
+ optional :name, :string, 1
21
+ optional :source, :enum, 2, "livekit.TrackSource"
22
+ optional :mime_type, :string, 3
23
+ optional :bitrate, :uint32, 4
24
+ optional :disable_dtx, :bool, 5
25
+ optional :channels, :uint32, 6
26
+ end
27
+ add_message "livekit.IngressVideoOptions" do
28
+ optional :name, :string, 1
29
+ optional :source, :enum, 2, "livekit.TrackSource"
30
+ optional :mime_type, :string, 3
31
+ repeated :layers, :message, 4, "livekit.VideoLayer"
32
+ end
33
+ add_message "livekit.IngressInfo" do
34
+ optional :ingress_id, :string, 1
35
+ optional :name, :string, 2
36
+ optional :stream_key, :string, 3
37
+ optional :url, :string, 4
38
+ optional :input_type, :enum, 5, "livekit.IngressInput"
39
+ optional :audio, :message, 6, "livekit.IngressAudioOptions"
40
+ optional :video, :message, 7, "livekit.IngressVideoOptions"
41
+ optional :room_name, :string, 8
42
+ optional :participant_identity, :string, 9
43
+ optional :participant_name, :string, 10
44
+ optional :reusable, :bool, 11
45
+ optional :state, :message, 12, "livekit.IngressState"
46
+ end
47
+ add_message "livekit.IngressState" do
48
+ optional :status, :enum, 1, "livekit.IngressState.Status"
49
+ optional :error, :string, 2
50
+ optional :video, :message, 3, "livekit.InputVideoState"
51
+ optional :audio, :message, 4, "livekit.InputAudioState"
52
+ optional :room_id, :string, 5
53
+ optional :started_at, :int64, 7
54
+ optional :ended_at, :int64, 8
55
+ repeated :tracks, :message, 6, "livekit.TrackInfo"
56
+ end
57
+ add_enum "livekit.IngressState.Status" do
58
+ value :ENDPOINT_INACTIVE, 0
59
+ value :ENDPOINT_BUFFERING, 1
60
+ value :ENDPOINT_PUBLISHING, 2
61
+ value :ENDPOINT_ERROR, 3
62
+ end
63
+ add_message "livekit.InputVideoState" do
64
+ optional :mime_type, :uint32, 1
65
+ optional :width, :uint32, 3
66
+ optional :height, :uint32, 4
67
+ optional :framerate, :uint32, 5
68
+ end
69
+ add_message "livekit.InputAudioState" do
70
+ optional :mime_type, :uint32, 1
71
+ optional :channels, :uint32, 3
72
+ optional :sample_rate, :uint32, 4
73
+ end
74
+ add_message "livekit.UpdateIngressRequest" do
75
+ optional :ingress_id, :string, 1
76
+ optional :name, :string, 2
77
+ optional :room_name, :string, 3
78
+ optional :participant_identity, :string, 4
79
+ optional :participant_name, :string, 5
80
+ optional :audio, :message, 6, "livekit.IngressAudioOptions"
81
+ optional :video, :message, 7, "livekit.IngressVideoOptions"
82
+ end
83
+ add_message "livekit.ListIngressRequest" do
84
+ optional :room_name, :string, 1
85
+ end
86
+ add_message "livekit.ListIngressResponse" do
87
+ repeated :items, :message, 1, "livekit.IngressInfo"
88
+ end
89
+ add_message "livekit.DeleteIngressRequest" do
90
+ optional :ingress_id, :string, 1
91
+ end
92
+ add_enum "livekit.IngressInput" do
93
+ value :RTMP_INPUT, 0
94
+ end
95
+ end
96
+ end
97
+
98
+ module LiveKit
99
+ module Proto
100
+ CreateIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.CreateIngressRequest").msgclass
101
+ IngressAudioOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressAudioOptions").msgclass
102
+ IngressVideoOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressVideoOptions").msgclass
103
+ IngressInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressInfo").msgclass
104
+ IngressState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressState").msgclass
105
+ IngressState::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressState.Status").enummodule
106
+ InputVideoState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.InputVideoState").msgclass
107
+ InputAudioState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.InputAudioState").msgclass
108
+ UpdateIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.UpdateIngressRequest").msgclass
109
+ ListIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ListIngressRequest").msgclass
110
+ ListIngressResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ListIngressResponse").msgclass
111
+ DeleteIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DeleteIngressRequest").msgclass
112
+ IngressInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressInput").enummodule
113
+ end
114
+ end
@@ -0,0 +1,20 @@
1
+ # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
2
+ require 'twirp'
3
+ require_relative 'livekit_ingress_pb.rb'
4
+
5
+ module LiveKit
6
+ module Proto
7
+ class IngressService < Twirp::Service
8
+ package 'livekit'
9
+ service 'Ingress'
10
+ rpc :CreateIngress, CreateIngressRequest, IngressInfo, :ruby_method => :create_ingress
11
+ rpc :UpdateIngress, UpdateIngressRequest, IngressInfo, :ruby_method => :update_ingress
12
+ rpc :ListIngress, ListIngressRequest, ListIngressResponse, :ruby_method => :list_ingress
13
+ rpc :DeleteIngress, DeleteIngressRequest, IngressInfo, :ruby_method => :delete_ingress
14
+ end
15
+
16
+ class IngressClient < Twirp::Client
17
+ client_for IngressService
18
+ end
19
+ end
20
+ end
@@ -27,6 +27,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
27
  optional :can_subscribe, :bool, 1
28
28
  optional :can_publish, :bool, 2
29
29
  optional :can_publish_data, :bool, 3
30
+ repeated :can_publish_sources, :enum, 9, "livekit.TrackSource"
30
31
  optional :hidden, :bool, 7
31
32
  optional :recorder, :bool, 8
32
33
  end
@@ -49,6 +50,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
49
50
  value :ACTIVE, 2
50
51
  value :DISCONNECTED, 3
51
52
  end
53
+ add_message "livekit.Encryption" do
54
+ end
55
+ add_enum "livekit.Encryption.Type" do
56
+ value :NONE, 0
57
+ value :GCM, 1
58
+ value :CUSTOM, 2
59
+ end
52
60
  add_message "livekit.SimulcastCodecInfo" do
53
61
  optional :mime_type, :string, 1
54
62
  optional :mid, :string, 2
@@ -69,6 +77,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
69
77
  optional :mime_type, :string, 11
70
78
  optional :mid, :string, 12
71
79
  repeated :codecs, :message, 13, "livekit.SimulcastCodecInfo"
80
+ optional :stereo, :bool, 14
81
+ optional :disable_red, :bool, 15
82
+ optional :encryption, :enum, 16, "livekit.Encryption.Type"
72
83
  end
73
84
  add_message "livekit.VideoLayer" do
74
85
  optional :quality, :enum, 1, "livekit.VideoQuality"
@@ -105,6 +116,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
105
116
  optional :participant_sid, :string, 1
106
117
  repeated :track_sids, :string, 2
107
118
  end
119
+ add_message "livekit.ServerInfo" do
120
+ optional :edition, :enum, 1, "livekit.ServerInfo.Edition"
121
+ optional :version, :string, 2
122
+ optional :protocol, :int32, 3
123
+ optional :region, :string, 4
124
+ optional :node_id, :string, 5
125
+ optional :debug_info, :string, 6
126
+ end
127
+ add_enum "livekit.ServerInfo.Edition" do
128
+ value :Standard, 0
129
+ value :Cloud, 1
130
+ end
108
131
  add_message "livekit.ClientInfo" do
109
132
  optional :sdk, :enum, 1, "livekit.ClientInfo.SDK"
110
133
  optional :version, :string, 2
@@ -115,6 +138,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
115
138
  optional :browser, :string, 7
116
139
  optional :browser_version, :string, 8
117
140
  optional :address, :string, 9
141
+ optional :network, :string, 10
118
142
  end
119
143
  add_enum "livekit.ClientInfo.SDK" do
120
144
  value :UNKNOWN, 0
@@ -130,6 +154,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
130
154
  optional :screen, :message, 2, "livekit.VideoConfiguration"
131
155
  optional :resume_connection, :enum, 3, "livekit.ClientConfigSetting"
132
156
  optional :disabled_codecs, :message, 4, "livekit.DisabledCodecs"
157
+ optional :force_relay, :enum, 5, "livekit.ClientConfigSetting"
133
158
  end
134
159
  add_message "livekit.VideoConfiguration" do
135
160
  optional :hardware_encoder, :enum, 1, "livekit.ClientConfigSetting"
@@ -144,6 +169,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
144
169
  optional :packets, :uint32, 4
145
170
  optional :packet_rate, :double, 5
146
171
  optional :bytes, :uint64, 6
172
+ optional :header_bytes, :uint64, 39
147
173
  optional :bitrate, :double, 7
148
174
  optional :packets_lost, :uint32, 8
149
175
  optional :packet_loss_rate, :double, 9
@@ -151,10 +177,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
151
177
  optional :packets_duplicate, :uint32, 11
152
178
  optional :packet_duplicate_rate, :double, 12
153
179
  optional :bytes_duplicate, :uint64, 13
180
+ optional :header_bytes_duplicate, :uint64, 40
154
181
  optional :bitrate_duplicate, :double, 14
155
182
  optional :packets_padding, :uint32, 15
156
183
  optional :packet_padding_rate, :double, 16
157
184
  optional :bytes_padding, :uint64, 17
185
+ optional :header_bytes_padding, :uint64, 41
158
186
  optional :bitrate_padding, :double, 18
159
187
  optional :packets_out_of_order, :uint32, 19
160
188
  optional :frames, :uint32, 20
@@ -177,6 +205,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
177
205
  optional :layer_lock_plis, :uint32, 35
178
206
  optional :last_layer_lock_pli, :message, 36, "google.protobuf.Timestamp"
179
207
  end
208
+ add_message "livekit.TimedVersion" do
209
+ optional :unix_micro, :int64, 1
210
+ optional :ticks, :int32, 2
211
+ end
180
212
  add_enum "livekit.TrackType" do
181
213
  value :AUDIO, 0
182
214
  value :VIDEO, 1
@@ -205,6 +237,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
205
237
  value :DISABLED, 1
206
238
  value :ENABLED, 2
207
239
  end
240
+ add_enum "livekit.DisconnectReason" do
241
+ value :UNKNOWN_REASON, 0
242
+ value :CLIENT_INITIATED, 1
243
+ value :DUPLICATE_IDENTITY, 2
244
+ value :SERVER_SHUTDOWN, 3
245
+ value :PARTICIPANT_REMOVED, 4
246
+ value :ROOM_DELETED, 5
247
+ value :STATE_MISMATCH, 6
248
+ value :JOIN_FAILURE, 7
249
+ end
250
+ add_enum "livekit.ReconnectReason" do
251
+ value :RR_UNKOWN, 0
252
+ value :RR_SIGNAL_DISCONNECTED, 1
253
+ value :RR_PUBLISHER_FAILED, 2
254
+ value :RR_SUBSCRIBER_FAILED, 3
255
+ value :RR_SWITCH_CANDIDATE, 4
256
+ end
208
257
  end
209
258
  end
210
259
 
@@ -215,6 +264,8 @@ module LiveKit
215
264
  ParticipantPermission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantPermission").msgclass
216
265
  ParticipantInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantInfo").msgclass
217
266
  ParticipantInfo::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantInfo.State").enummodule
267
+ Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.Encryption").msgclass
268
+ Encryption::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.Encryption.Type").enummodule
218
269
  SimulcastCodecInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SimulcastCodecInfo").msgclass
219
270
  TrackInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackInfo").msgclass
220
271
  VideoLayer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoLayer").msgclass
@@ -224,16 +275,21 @@ module LiveKit
224
275
  SpeakerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SpeakerInfo").msgclass
225
276
  UserPacket = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.UserPacket").msgclass
226
277
  ParticipantTracks = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantTracks").msgclass
278
+ ServerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ServerInfo").msgclass
279
+ ServerInfo::Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ServerInfo.Edition").enummodule
227
280
  ClientInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientInfo").msgclass
228
281
  ClientInfo::SDK = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientInfo.SDK").enummodule
229
282
  ClientConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientConfiguration").msgclass
230
283
  VideoConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoConfiguration").msgclass
231
284
  DisabledCodecs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DisabledCodecs").msgclass
232
285
  RTPStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.RTPStats").msgclass
286
+ TimedVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TimedVersion").msgclass
233
287
  TrackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackType").enummodule
234
288
  TrackSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackSource").enummodule
235
289
  VideoQuality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoQuality").enummodule
236
290
  ConnectionQuality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ConnectionQuality").enummodule
237
291
  ClientConfigSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientConfigSetting").enummodule
292
+ DisconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DisconnectReason").enummodule
293
+ ReconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ReconnectReason").enummodule
238
294
  end
239
295
  end
@@ -4,6 +4,7 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'livekit_models_pb'
7
+ require 'livekit_egress_pb'
7
8
 
8
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
10
  add_file("livekit_room.proto", :syntax => :proto3) do
@@ -13,6 +14,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  optional :max_participants, :uint32, 3
14
15
  optional :node_id, :string, 4
15
16
  optional :metadata, :string, 5
17
+ optional :egress, :message, 6, "livekit.RoomEgress"
18
+ end
19
+ add_message "livekit.RoomEgress" do
20
+ optional :room, :message, 1, "livekit.RoomCompositeEgressRequest"
21
+ optional :tracks, :message, 2, "livekit.AutoTrackEgress"
16
22
  end
17
23
  add_message "livekit.ListRoomsRequest" do
18
24
  repeated :names, :string, 1
@@ -51,6 +57,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
51
57
  optional :identity, :string, 2
52
58
  optional :metadata, :string, 3
53
59
  optional :permission, :message, 4, "livekit.ParticipantPermission"
60
+ optional :name, :string, 5
54
61
  end
55
62
  add_message "livekit.UpdateSubscriptionsRequest" do
56
63
  optional :room, :string, 1
@@ -79,6 +86,7 @@ end
79
86
  module LiveKit
80
87
  module Proto
81
88
  CreateRoomRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.CreateRoomRequest").msgclass
89
+ RoomEgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.RoomEgress").msgclass
82
90
  ListRoomsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ListRoomsRequest").msgclass
83
91
  ListRoomsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ListRoomsResponse").msgclass
84
92
  DeleteRoomRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DeleteRoomRequest").msgclass
@@ -5,7 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'livekit_models_pb'
7
7
  require 'livekit_egress_pb'
8
- require 'livekit_recording_pb'
8
+ require 'livekit_ingress_pb'
9
9
 
10
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
11
11
  add_file("livekit_webhook.proto", :syntax => :proto3) do
@@ -13,8 +13,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  optional :event, :string, 1
14
14
  optional :room, :message, 2, "livekit.Room"
15
15
  optional :participant, :message, 3, "livekit.ParticipantInfo"
16
- optional :recording_info, :message, 5, "livekit.RecordingInfo"
17
16
  optional :egress_info, :message, 9, "livekit.EgressInfo"
17
+ optional :ingress_info, :message, 10, "livekit.IngressInfo"
18
18
  optional :track, :message, 8, "livekit.TrackInfo"
19
19
  optional :id, :string, 6
20
20
  optional :created_at, :int64, 7
@@ -13,10 +13,15 @@ module LiveKit
13
13
  @api_secret = api_secret
14
14
  end
15
15
 
16
- def create_room(name, empty_timeout: nil, max_participants: nil)
16
+ def create_room(name, empty_timeout: nil, max_participants: nil, egress: nil)
17
17
  self.rpc(
18
18
  :CreateRoom,
19
- Proto::CreateRoomRequest.new(name: name, empty_timeout: empty_timeout, max_participants: max_participants),
19
+ Proto::CreateRoomRequest.new(
20
+ name: name,
21
+ empty_timeout: empty_timeout,
22
+ max_participants: max_participants,
23
+ egress: egress,
24
+ ),
20
25
  headers: auth_header(roomCreate: true),
21
26
  )
22
27
  end
@@ -82,7 +87,7 @@ module LiveKit
82
87
  )
83
88
  end
84
89
 
85
- def update_participant(room:, identity:, metadata: nil, permission: nil)
90
+ def update_participant(room:, identity:, metadata: nil, permission: nil, name: nil)
86
91
  req = Proto::UpdateParticipantRequest.new(room: room, identity: identity)
87
92
  if metadata
88
93
  req.metadata = metadata
@@ -90,6 +95,9 @@ module LiveKit
90
95
  if permission
91
96
  req.permission = permission
92
97
  end
98
+ if name
99
+ req.name = name
100
+ end
93
101
  self.rpc(
94
102
  :UpdateParticipant,
95
103
  req,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LiveKit
4
- VERSION = "0.3.1"
4
+ VERSION = "0.5.0"
5
5
  end
data/lib/livekit.rb CHANGED
@@ -10,3 +10,4 @@ require "livekit/version"
10
10
  $LOAD_PATH.unshift(File.expand_path("livekit/proto", __dir__))
11
11
  require "livekit/room_service_client"
12
12
  require "livekit/egress_service_client"
13
+ require "livekit/ingress_service_client"
@@ -26,9 +26,11 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = ["lib"]
28
28
 
29
- spec.add_dependency "google-protobuf", "~> 3.21.0"
30
- spec.add_dependency "jwt", "~> 2.2.3"
31
- spec.add_dependency "twirp", "~> 1.9.0"
29
+ spec.add_dependency "google-protobuf", ">= 3.21.0", "< 4.0"
30
+ spec.add_dependency "jwt", ">= 2.2.3", "< 3.0"
31
+ # workaround for twirp 1.10.0 missing it
32
+ spec.add_dependency 'rack', '>= 2.2.3', "< 3.0"
33
+ spec.add_dependency "twirp", ">= 1.10.0", "< 2.0"
32
34
 
33
35
  # For more information and examples about making a new gem, checkout our
34
36
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livekit-server-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Omri Gabay
@@ -9,50 +9,88 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-06-13 00:00:00.000000000 Z
12
+ date: 2023-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-protobuf
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.21.0
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '4.0'
21
24
  type: :runtime
22
25
  prerelease: false
23
26
  version_requirements: !ruby/object:Gem::Requirement
24
27
  requirements:
25
- - - "~>"
28
+ - - ">="
26
29
  - !ruby/object:Gem::Version
27
30
  version: 3.21.0
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
28
34
  - !ruby/object:Gem::Dependency
29
35
  name: jwt
30
36
  requirement: !ruby/object:Gem::Requirement
31
37
  requirements:
32
- - - "~>"
38
+ - - ">="
33
39
  - !ruby/object:Gem::Version
34
40
  version: 2.2.3
41
+ - - "<"
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
35
44
  type: :runtime
36
45
  prerelease: false
37
46
  version_requirements: !ruby/object:Gem::Requirement
38
47
  requirements:
39
- - - "~>"
48
+ - - ">="
40
49
  - !ruby/object:Gem::Version
41
50
  version: 2.2.3
51
+ - - "<"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rack
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.2.3
61
+ - - "<"
62
+ - !ruby/object:Gem::Version
63
+ version: '3.0'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.2.3
71
+ - - "<"
72
+ - !ruby/object:Gem::Version
73
+ version: '3.0'
42
74
  - !ruby/object:Gem::Dependency
43
75
  name: twirp
44
76
  requirement: !ruby/object:Gem::Requirement
45
77
  requirements:
46
- - - "~>"
78
+ - - ">="
47
79
  - !ruby/object:Gem::Version
48
- version: 1.9.0
80
+ version: 1.10.0
81
+ - - "<"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.0'
49
84
  type: :runtime
50
85
  prerelease: false
51
86
  version_requirements: !ruby/object:Gem::Requirement
52
87
  requirements:
53
- - - "~>"
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.10.0
91
+ - - "<"
54
92
  - !ruby/object:Gem::Version
55
- version: 1.9.0
93
+ version: '2.0'
56
94
  description:
57
95
  email:
58
96
  - omri@omrigabay.me
@@ -98,8 +136,11 @@ files:
98
136
  - lib/livekit/egress_service_client.rb
99
137
  - lib/livekit/egress_types.rb
100
138
  - lib/livekit/grants.rb
139
+ - lib/livekit/ingress_service_client.rb
101
140
  - lib/livekit/proto/livekit_egress_pb.rb
102
141
  - lib/livekit/proto/livekit_egress_twirp.rb
142
+ - lib/livekit/proto/livekit_ingress_pb.rb
143
+ - lib/livekit/proto/livekit_ingress_twirp.rb
103
144
  - lib/livekit/proto/livekit_models_pb.rb
104
145
  - lib/livekit/proto/livekit_models_twirp.rb
105
146
  - lib/livekit/proto/livekit_room_pb.rb
@@ -130,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
171
  - !ruby/object:Gem::Version
131
172
  version: '0'
132
173
  requirements: []
133
- rubygems_version: 3.3.11
174
+ rubygems_version: 3.3.7
134
175
  signing_key:
135
176
  specification_version: 4
136
177
  summary: LiveKit Server SDK for Ruby