livekit-server-sdk 0.4.0 → 0.5.1

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: 7ca33e2d576356576a6fdffbb7ca8e7653f0dc5715138eb73fa63382c85d27cb
4
- data.tar.gz: 76d47b446727732114c77ed92b412858f3087d71a23783af2a4aa6b677222168
3
+ metadata.gz: d78bb377d5f4bf96931e62ec8f3a0a23e546bcb31af42ddfcb82b8be832e66b5
4
+ data.tar.gz: 1c342d530b2b5180fdabc8c8f9834ad68f83619b790e10b9c2c78433ca491743
5
5
  SHA512:
6
- metadata.gz: 3dac51a33c69794ca2eddfff9b35c375b6cbbc0578a3273cb4ba10088b3e6d056e77db02a7092a7b97f62123e84795c8a3dd273606a1e92a438ed155a0a54412
7
- data.tar.gz: c5d71a01a978d34cb383b57c2df3120e4dff745d691e6a4d78cf947e6fa3c156bbfc098b0b2b4aa99f69a44d0ec72059892cc87a57cbc40c11dc82eb55fe5471
6
+ metadata.gz: 1b3c4bc7983a4f185aa520e1a09b2db85669c9cefcd65bc55564175d018e894a343d6591d76f3ea6503e13e2e15ec779c3ba7471d449ed98982f38bf464f6364
7
+ data.tar.gz: bc80e7ff0c1adc3a5c5347606f22acd5506d4b9b8a1fa34a95397da245180eca85282b2b7500cc577f13ce516b7dcfe804748fc4d56b7fd71b43ba7d2e05ed60
data/Gemfile.lock CHANGED
@@ -1,66 +1,49 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- livekit-server-sdk (0.4.0)
5
- google-protobuf (~> 3.21.0)
6
- jwt (~> 2.2.3)
7
- twirp (~> 1.9.0)
4
+ livekit-server-sdk (0.5.0)
5
+ google-protobuf (>= 3.21.0, < 4.0)
6
+ jwt (>= 2.2.3, < 3.0)
7
+ rack (>= 2.2.3, < 3.0)
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.2)
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.7)
38
- jwt (2.2.3)
18
+ faraday-net_http (3.0.2)
19
+ google-protobuf (3.22.2)
20
+ google-protobuf (3.22.2-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 (2.2.6.4)
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)
data/bin/bootstrap.sh CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  echo "Ensure protoc and Go are installed"
4
4
 
5
- go install github.com/twitchtv/twirp-ruby/protoc-gen-twirp_ruby@latest
5
+ go install github.com/github/twirp-ruby/protoc-gen-twirp_ruby@latest
@@ -15,7 +15,7 @@ module LiveKit
15
15
 
16
16
  def start_room_composite_egress(
17
17
  room_name,
18
- # one of EncodedFileOutput, SegmentedFileOutput or StreamOutput
18
+ # EncodedFileOutput, SegmentedFileOutput, StreamOutput, or array containing up to one of each
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, SegmentedFileOutput or StreamOutput
52
+ # EncodedFileOutput, SegmentedFileOutput, StreamOutput, or array containing up to one of each
53
53
  output,
54
54
  # TrackID of an audio track
55
55
  audio_track_id: nil,
@@ -99,7 +99,7 @@ module LiveKit
99
99
 
100
100
  def start_web_egress(
101
101
  url,
102
- # one of EncodedFileOutput, SegmentedFileOutput or StreamOutput
102
+ # EncodedFileOutput, SegmentedFileOutput, StreamOutput, or array containing up to one of each
103
103
  output,
104
104
  # EncodingOptionsPreset, only one of preset or advanced could be set
105
105
  preset: nil,
@@ -172,15 +172,29 @@ module LiveKit
172
172
 
173
173
  # helper that sets output to file or stream
174
174
  def set_output(request, output)
175
- if output.nil?
176
- raise "output cannot be nil"
177
- end
178
- if output.is_a? LiveKit::Proto::EncodedFileOutput or output.is_a? LiveKit::Proto::DirectFileOutput
175
+ raise "output cannot be nil" if output.nil?
176
+ if output.is_a? Array
177
+ output.each do |out|
178
+ if out.is_a? LiveKit::Proto::EncodedFileOutput
179
+ raise "cannot add multiple file outputs" if request.file_outputs.any?
180
+ request.file_outputs = [out]
181
+ elsif out.is_a? LiveKit::Proto::SegmentedFileOutput
182
+ raise "cannot add multiple segmented file outputs" if request.segment_outputs.any?
183
+ request.segment_outputs = [out]
184
+ elsif out.is_a? Livekit::Proto::StreamOutput
185
+ raise "cannot add multiple stream outputs" if request.stream_outputs.any?
186
+ request.stream_outputs = [out]
187
+ end
188
+ end
189
+ elsif output.is_a? LiveKit::Proto::EncodedFileOutput
179
190
  request.file = output
191
+ request.file_outputs = [output]
180
192
  elsif output.is_a? LiveKit::Proto::SegmentedFileOutput
181
193
  request.segments = output
182
- else
194
+ request.segment_outputs = [output]
195
+ elsif output.is_a? LiveKit::Proto::StreamOutput
183
196
  request.stream = output
197
+ request.stream_outputs = [output]
184
198
  end
185
199
  end
186
200
  end
@@ -3,6 +3,8 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'livekit_models_pb'
7
+
6
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
9
  add_file("livekit_egress.proto", :syntax => :proto3) do
8
10
  add_message "livekit.RoomCompositeEgressRequest" do
@@ -11,6 +13,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
11
13
  optional :audio_only, :bool, 3
12
14
  optional :video_only, :bool, 4
13
15
  optional :custom_base_url, :string, 5
16
+ repeated :file_outputs, :message, 11, "livekit.EncodedFileOutput"
17
+ repeated :stream_outputs, :message, 12, "livekit.StreamOutput"
18
+ repeated :segment_outputs, :message, 13, "livekit.SegmentedFileOutput"
14
19
  oneof :output do
15
20
  optional :file, :message, 6, "livekit.EncodedFileOutput"
16
21
  optional :stream, :message, 7, "livekit.StreamOutput"
@@ -21,10 +26,30 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
21
26
  optional :advanced, :message, 9, "livekit.EncodingOptions"
22
27
  end
23
28
  end
29
+ add_message "livekit.WebEgressRequest" do
30
+ optional :url, :string, 1
31
+ optional :audio_only, :bool, 2
32
+ optional :video_only, :bool, 3
33
+ repeated :file_outputs, :message, 9, "livekit.EncodedFileOutput"
34
+ repeated :stream_outputs, :message, 10, "livekit.StreamOutput"
35
+ repeated :segment_outputs, :message, 11, "livekit.SegmentedFileOutput"
36
+ oneof :output do
37
+ optional :file, :message, 4, "livekit.EncodedFileOutput"
38
+ optional :stream, :message, 5, "livekit.StreamOutput"
39
+ optional :segments, :message, 6, "livekit.SegmentedFileOutput"
40
+ end
41
+ oneof :options do
42
+ optional :preset, :enum, 7, "livekit.EncodingOptionsPreset"
43
+ optional :advanced, :message, 8, "livekit.EncodingOptions"
44
+ end
45
+ end
24
46
  add_message "livekit.TrackCompositeEgressRequest" do
25
47
  optional :room_name, :string, 1
26
48
  optional :audio_track_id, :string, 2
27
49
  optional :video_track_id, :string, 3
50
+ repeated :file_outputs, :message, 11, "livekit.EncodedFileOutput"
51
+ repeated :stream_outputs, :message, 12, "livekit.StreamOutput"
52
+ repeated :segment_outputs, :message, 13, "livekit.SegmentedFileOutput"
28
53
  oneof :output do
29
54
  optional :file, :message, 4, "livekit.EncodedFileOutput"
30
55
  optional :stream, :message, 5, "livekit.StreamOutput"
@@ -43,20 +68,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
43
68
  optional :websocket_url, :string, 4
44
69
  end
45
70
  end
46
- add_message "livekit.WebEgressRequest" do
47
- optional :url, :string, 1
48
- optional :audio_only, :bool, 2
49
- optional :video_only, :bool, 3
50
- oneof :output do
51
- optional :file, :message, 4, "livekit.EncodedFileOutput"
52
- optional :stream, :message, 5, "livekit.StreamOutput"
53
- optional :segments, :message, 6, "livekit.SegmentedFileOutput"
54
- end
55
- oneof :options do
56
- optional :preset, :enum, 7, "livekit.EncodingOptionsPreset"
57
- optional :advanced, :message, 8, "livekit.EncodingOptions"
58
- end
59
- end
60
71
  add_message "livekit.EncodedFileOutput" do
61
72
  optional :file_type, :enum, 1, "livekit.EncodedFileType"
62
73
  optional :filepath, :string, 2
@@ -73,6 +84,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
73
84
  optional :filename_prefix, :string, 2
74
85
  optional :playlist_name, :string, 3
75
86
  optional :segment_duration, :uint32, 4
87
+ optional :filename_suffix, :enum, 10, "livekit.SegmentedFileSuffix"
76
88
  optional :disable_manifest, :bool, 8
77
89
  oneof :output do
78
90
  optional :s3, :message, 5, "livekit.S3Upload"
@@ -102,7 +114,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
102
114
  optional :tagging, :string, 8
103
115
  end
104
116
  add_message "livekit.GCPUpload" do
105
- optional :credentials, :bytes, 1
117
+ optional :credentials, :string, 1
106
118
  optional :bucket, :string, 2
107
119
  end
108
120
  add_message "livekit.AzureBlobUpload" do
@@ -131,6 +143,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
131
143
  optional :audio_frequency, :int32, 7
132
144
  optional :video_codec, :enum, 8, "livekit.VideoCodec"
133
145
  optional :video_bitrate, :int32, 9
146
+ optional :key_frame_interval, :double, 10
134
147
  end
135
148
  add_message "livekit.UpdateLayoutRequest" do
136
149
  optional :egress_id, :string, 1
@@ -143,6 +156,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
143
156
  end
144
157
  add_message "livekit.ListEgressRequest" do
145
158
  optional :room_name, :string, 1
159
+ optional :egress_id, :string, 2
160
+ optional :active, :bool, 3
146
161
  end
147
162
  add_message "livekit.ListEgressResponse" do
148
163
  repeated :items, :message, 1, "livekit.EgressInfo"
@@ -158,6 +173,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
158
173
  optional :started_at, :int64, 10
159
174
  optional :ended_at, :int64, 11
160
175
  optional :error, :string, 9
176
+ repeated :stream_results, :message, 15, "livekit.StreamInfo"
177
+ repeated :file_results, :message, 16, "livekit.FileInfo"
178
+ repeated :segment_results, :message, 17, "livekit.SegmentsInfo"
161
179
  oneof :request do
162
180
  optional :room_composite, :message, 4, "livekit.RoomCompositeEgressRequest"
163
181
  optional :track_composite, :message, 5, "livekit.TrackCompositeEgressRequest"
@@ -179,6 +197,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
179
197
  optional :ended_at, :int64, 3
180
198
  optional :duration, :int64, 4
181
199
  optional :status, :enum, 5, "livekit.StreamInfo.Status"
200
+ optional :error, :string, 6
182
201
  end
183
202
  add_enum "livekit.StreamInfo.Status" do
184
203
  value :ACTIVE, 0
@@ -216,24 +235,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
216
235
  value :MP4, 1
217
236
  value :OGG, 2
218
237
  end
219
- add_enum "livekit.StreamProtocol" do
220
- value :DEFAULT_PROTOCOL, 0
221
- value :RTMP, 1
222
- end
223
238
  add_enum "livekit.SegmentedFileProtocol" do
224
239
  value :DEFAULT_SEGMENTED_FILE_PROTOCOL, 0
225
240
  value :HLS_PROTOCOL, 1
226
241
  end
227
- add_enum "livekit.AudioCodec" do
228
- value :DEFAULT_AC, 0
229
- value :OPUS, 1
230
- value :AAC, 2
242
+ add_enum "livekit.SegmentedFileSuffix" do
243
+ value :INDEX, 0
244
+ value :TIMESTAMP, 1
231
245
  end
232
- add_enum "livekit.VideoCodec" do
233
- value :DEFAULT_VC, 0
234
- value :H264_BASELINE, 1
235
- value :H264_MAIN, 2
236
- value :H264_HIGH, 3
246
+ add_enum "livekit.StreamProtocol" do
247
+ value :DEFAULT_PROTOCOL, 0
248
+ value :RTMP, 1
237
249
  end
238
250
  add_enum "livekit.EncodingOptionsPreset" do
239
251
  value :H264_720P_30, 0
@@ -260,9 +272,9 @@ end
260
272
  module LiveKit
261
273
  module Proto
262
274
  RoomCompositeEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.RoomCompositeEgressRequest").msgclass
275
+ WebEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.WebEgressRequest").msgclass
263
276
  TrackCompositeEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackCompositeEgressRequest").msgclass
264
277
  TrackEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackEgressRequest").msgclass
265
- WebEgressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.WebEgressRequest").msgclass
266
278
  EncodedFileOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodedFileOutput").msgclass
267
279
  SegmentedFileOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentedFileOutput").msgclass
268
280
  DirectFileOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DirectFileOutput").msgclass
@@ -285,10 +297,9 @@ module LiveKit
285
297
  SegmentsInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentsInfo").msgclass
286
298
  AutoTrackEgress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AutoTrackEgress").msgclass
287
299
  EncodedFileType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodedFileType").enummodule
288
- StreamProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamProtocol").enummodule
289
300
  SegmentedFileProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentedFileProtocol").enummodule
290
- AudioCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AudioCodec").enummodule
291
- VideoCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoCodec").enummodule
301
+ SegmentedFileSuffix = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SegmentedFileSuffix").enummodule
302
+ StreamProtocol = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.StreamProtocol").enummodule
292
303
  EncodingOptionsPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EncodingOptionsPreset").enummodule
293
304
  EgressStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.EgressStatus").enummodule
294
305
  end
@@ -1,10 +1,10 @@
1
- # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
1
+ # Code generated by protoc-gen-twirp_ruby 1.10.0, DO NOT EDIT.
2
2
  require 'twirp'
3
3
  require_relative 'livekit_egress_pb.rb'
4
4
 
5
5
  module LiveKit
6
6
  module Proto
7
- class EgressService < Twirp::Service
7
+ class EgressService < ::Twirp::Service
8
8
  package 'livekit'
9
9
  service 'Egress'
10
10
  rpc :StartRoomCompositeEgress, RoomCompositeEgressRequest, EgressInfo, :ruby_method => :start_room_composite_egress
@@ -17,7 +17,7 @@ module LiveKit
17
17
  rpc :StopEgress, StopEgressRequest, EgressInfo, :ruby_method => :stop_egress
18
18
  end
19
19
 
20
- class EgressClient < Twirp::Client
20
+ class EgressClient < ::Twirp::Client
21
21
  client_for EgressService
22
22
  end
23
23
  end
@@ -19,16 +19,29 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
19
19
  add_message "livekit.IngressAudioOptions" do
20
20
  optional :name, :string, 1
21
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
22
+ oneof :encoding_options do
23
+ optional :preset, :enum, 3, "livekit.IngressAudioEncodingPreset"
24
+ optional :options, :message, 4, "livekit.IngressAudioEncodingOptions"
25
+ end
26
26
  end
27
27
  add_message "livekit.IngressVideoOptions" do
28
28
  optional :name, :string, 1
29
29
  optional :source, :enum, 2, "livekit.TrackSource"
30
- optional :mime_type, :string, 3
31
- repeated :layers, :message, 4, "livekit.VideoLayer"
30
+ oneof :encoding_options do
31
+ optional :preset, :enum, 3, "livekit.IngressVideoEncodingPreset"
32
+ optional :options, :message, 4, "livekit.IngressVideoEncodingOptions"
33
+ end
34
+ end
35
+ add_message "livekit.IngressAudioEncodingOptions" do
36
+ optional :audio_codec, :enum, 1, "livekit.AudioCodec"
37
+ optional :bitrate, :uint32, 2
38
+ optional :disable_dtx, :bool, 3
39
+ optional :channels, :uint32, 4
40
+ end
41
+ add_message "livekit.IngressVideoEncodingOptions" do
42
+ optional :video_codec, :enum, 1, "livekit.VideoCodec"
43
+ optional :frame_rate, :double, 2
44
+ repeated :layers, :message, 3, "livekit.VideoLayer"
32
45
  end
33
46
  add_message "livekit.IngressInfo" do
34
47
  optional :ingress_id, :string, 1
@@ -51,6 +64,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
51
64
  optional :audio, :message, 4, "livekit.InputAudioState"
52
65
  optional :room_id, :string, 5
53
66
  optional :started_at, :int64, 7
67
+ optional :ended_at, :int64, 8
54
68
  repeated :tracks, :message, 6, "livekit.TrackInfo"
55
69
  end
56
70
  add_enum "livekit.IngressState.Status" do
@@ -60,13 +74,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
60
74
  value :ENDPOINT_ERROR, 3
61
75
  end
62
76
  add_message "livekit.InputVideoState" do
63
- optional :mime_type, :uint32, 1
77
+ optional :mime_type, :string, 1
64
78
  optional :width, :uint32, 3
65
79
  optional :height, :uint32, 4
66
80
  optional :framerate, :uint32, 5
67
81
  end
68
82
  add_message "livekit.InputAudioState" do
69
- optional :mime_type, :uint32, 1
83
+ optional :mime_type, :string, 1
70
84
  optional :channels, :uint32, 3
71
85
  optional :sample_rate, :uint32, 4
72
86
  end
@@ -91,6 +105,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
91
105
  add_enum "livekit.IngressInput" do
92
106
  value :RTMP_INPUT, 0
93
107
  end
108
+ add_enum "livekit.IngressAudioEncodingPreset" do
109
+ value :OPUS_STEREO_96KBPS, 0
110
+ value :OPUS_MONO_64KBS, 1
111
+ end
112
+ add_enum "livekit.IngressVideoEncodingPreset" do
113
+ value :H264_720P_30FPS_3_LAYERS, 0
114
+ value :H264_1080P_30FPS_3_LAYERS, 1
115
+ value :H264_540P_25FPS_2_LAYERS, 2
116
+ value :H264_720P_30FPS_1_LAYER, 3
117
+ value :H264_1080P_30FPS_1_LAYER, 4
118
+ end
94
119
  end
95
120
  end
96
121
 
@@ -99,6 +124,8 @@ module LiveKit
99
124
  CreateIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.CreateIngressRequest").msgclass
100
125
  IngressAudioOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressAudioOptions").msgclass
101
126
  IngressVideoOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressVideoOptions").msgclass
127
+ IngressAudioEncodingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressAudioEncodingOptions").msgclass
128
+ IngressVideoEncodingOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressVideoEncodingOptions").msgclass
102
129
  IngressInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressInfo").msgclass
103
130
  IngressState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressState").msgclass
104
131
  IngressState::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressState.Status").enummodule
@@ -109,5 +136,7 @@ module LiveKit
109
136
  ListIngressResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ListIngressResponse").msgclass
110
137
  DeleteIngressRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DeleteIngressRequest").msgclass
111
138
  IngressInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressInput").enummodule
139
+ IngressAudioEncodingPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressAudioEncodingPreset").enummodule
140
+ IngressVideoEncodingPreset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.IngressVideoEncodingPreset").enummodule
112
141
  end
113
142
  end
@@ -1,10 +1,10 @@
1
- # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
1
+ # Code generated by protoc-gen-twirp_ruby 1.10.0, DO NOT EDIT.
2
2
  require 'twirp'
3
3
  require_relative 'livekit_ingress_pb.rb'
4
4
 
5
5
  module LiveKit
6
6
  module Proto
7
- class IngressService < Twirp::Service
7
+ class IngressService < ::Twirp::Service
8
8
  package 'livekit'
9
9
  service 'Ingress'
10
10
  rpc :CreateIngress, CreateIngressRequest, IngressInfo, :ruby_method => :create_ingress
@@ -13,7 +13,7 @@ module LiveKit
13
13
  rpc :DeleteIngress, DeleteIngressRequest, IngressInfo, :ruby_method => :delete_ingress
14
14
  end
15
15
 
16
- class IngressClient < Twirp::Client
16
+ class IngressClient < ::Twirp::Client
17
17
  client_for IngressService
18
18
  end
19
19
  end
@@ -27,8 +27,10 @@ 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
33
+ optional :can_update_metadata, :bool, 10
32
34
  end
33
35
  add_message "livekit.ParticipantInfo" do
34
36
  optional :sid, :string, 1
@@ -49,6 +51,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
49
51
  value :ACTIVE, 2
50
52
  value :DISCONNECTED, 3
51
53
  end
54
+ add_message "livekit.Encryption" do
55
+ end
56
+ add_enum "livekit.Encryption.Type" do
57
+ value :NONE, 0
58
+ value :GCM, 1
59
+ value :CUSTOM, 2
60
+ end
52
61
  add_message "livekit.SimulcastCodecInfo" do
53
62
  optional :mime_type, :string, 1
54
63
  optional :mid, :string, 2
@@ -71,6 +80,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
71
80
  repeated :codecs, :message, 13, "livekit.SimulcastCodecInfo"
72
81
  optional :stereo, :bool, 14
73
82
  optional :disable_red, :bool, 15
83
+ optional :encryption, :enum, 16, "livekit.Encryption.Type"
74
84
  end
75
85
  add_message "livekit.VideoLayer" do
76
86
  optional :quality, :enum, 1, "livekit.VideoQuality"
@@ -102,6 +112,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
102
112
  optional :participant_sid, :string, 1
103
113
  optional :payload, :bytes, 2
104
114
  repeated :destination_sids, :string, 3
115
+ proto3_optional :topic, :string, 4
105
116
  end
106
117
  add_message "livekit.ParticipantTracks" do
107
118
  optional :participant_sid, :string, 1
@@ -139,6 +150,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
139
150
  value :FLUTTER, 4
140
151
  value :GO, 5
141
152
  value :UNITY, 6
153
+ value :REACT_NATIVE, 7
154
+ value :RUST, 8
142
155
  end
143
156
  add_message "livekit.ClientConfiguration" do
144
157
  optional :video, :message, 1, "livekit.VideoConfiguration"
@@ -200,6 +213,18 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
200
213
  optional :unix_micro, :int64, 1
201
214
  optional :ticks, :int32, 2
202
215
  end
216
+ add_enum "livekit.AudioCodec" do
217
+ value :DEFAULT_AC, 0
218
+ value :OPUS, 1
219
+ value :AAC, 2
220
+ end
221
+ add_enum "livekit.VideoCodec" do
222
+ value :DEFAULT_VC, 0
223
+ value :H264_BASELINE, 1
224
+ value :H264_MAIN, 2
225
+ value :H264_HIGH, 3
226
+ value :VP8, 4
227
+ end
203
228
  add_enum "livekit.TrackType" do
204
229
  value :AUDIO, 0
205
230
  value :VIDEO, 1
@@ -238,6 +263,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
238
263
  value :STATE_MISMATCH, 6
239
264
  value :JOIN_FAILURE, 7
240
265
  end
266
+ add_enum "livekit.ReconnectReason" do
267
+ value :RR_UNKOWN, 0
268
+ value :RR_SIGNAL_DISCONNECTED, 1
269
+ value :RR_PUBLISHER_FAILED, 2
270
+ value :RR_SUBSCRIBER_FAILED, 3
271
+ value :RR_SWITCH_CANDIDATE, 4
272
+ end
241
273
  end
242
274
  end
243
275
 
@@ -248,6 +280,8 @@ module LiveKit
248
280
  ParticipantPermission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantPermission").msgclass
249
281
  ParticipantInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantInfo").msgclass
250
282
  ParticipantInfo::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ParticipantInfo.State").enummodule
283
+ Encryption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.Encryption").msgclass
284
+ Encryption::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.Encryption.Type").enummodule
251
285
  SimulcastCodecInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SimulcastCodecInfo").msgclass
252
286
  TrackInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackInfo").msgclass
253
287
  VideoLayer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoLayer").msgclass
@@ -266,11 +300,14 @@ module LiveKit
266
300
  DisabledCodecs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DisabledCodecs").msgclass
267
301
  RTPStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.RTPStats").msgclass
268
302
  TimedVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TimedVersion").msgclass
303
+ AudioCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.AudioCodec").enummodule
304
+ VideoCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoCodec").enummodule
269
305
  TrackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackType").enummodule
270
306
  TrackSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.TrackSource").enummodule
271
307
  VideoQuality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.VideoQuality").enummodule
272
308
  ConnectionQuality = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ConnectionQuality").enummodule
273
309
  ClientConfigSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientConfigSetting").enummodule
274
310
  DisconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DisconnectReason").enummodule
311
+ ReconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ReconnectReason").enummodule
275
312
  end
276
313
  end
@@ -1,4 +1,4 @@
1
- # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
1
+ # Code generated by protoc-gen-twirp_ruby 1.10.0, DO NOT EDIT.
2
2
  require 'twirp'
3
3
  require_relative 'livekit_models_pb.rb'
4
4
 
@@ -73,6 +73,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
73
73
  optional :data, :bytes, 2
74
74
  optional :kind, :enum, 3, "livekit.DataPacket.Kind"
75
75
  repeated :destination_sids, :string, 4
76
+ proto3_optional :topic, :string, 5
76
77
  end
77
78
  add_message "livekit.SendDataResponse" do
78
79
  end
@@ -1,10 +1,10 @@
1
- # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
1
+ # Code generated by protoc-gen-twirp_ruby 1.10.0, DO NOT EDIT.
2
2
  require 'twirp'
3
3
  require_relative 'livekit_room_pb.rb'
4
4
 
5
5
  module LiveKit
6
6
  module Proto
7
- class RoomServiceService < Twirp::Service
7
+ class RoomServiceService < ::Twirp::Service
8
8
  package 'livekit'
9
9
  service 'RoomService'
10
10
  rpc :CreateRoom, CreateRoomRequest, Room, :ruby_method => :create_room
@@ -20,7 +20,7 @@ module LiveKit
20
20
  rpc :UpdateRoomMetadata, UpdateRoomMetadataRequest, Room, :ruby_method => :update_room_metadata
21
21
  end
22
22
 
23
- class RoomServiceClient < Twirp::Client
23
+ class RoomServiceClient < ::Twirp::Client
24
24
  client_for RoomServiceService
25
25
  end
26
26
  end
@@ -1,4 +1,4 @@
1
- # Code generated by protoc-gen-twirp_ruby 1.9.0, DO NOT EDIT.
1
+ # Code generated by protoc-gen-twirp_ruby 1.10.0, DO NOT EDIT.
2
2
  require 'twirp'
3
3
  require_relative 'livekit_webhook_pb.rb'
4
4
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LiveKit
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.1"
5
5
  end
@@ -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.4.0
4
+ version: 0.5.1
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-11-09 00:00:00.000000000 Z
12
+ date: 2023-04-03 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
@@ -96,7 +134,6 @@ files:
96
134
  - lib/livekit/access_token.rb
97
135
  - lib/livekit/auth_mixin.rb
98
136
  - lib/livekit/egress_service_client.rb
99
- - lib/livekit/egress_types.rb
100
137
  - lib/livekit/grants.rb
101
138
  - lib/livekit/ingress_service_client.rb
102
139
  - lib/livekit/proto/livekit_egress_pb.rb
File without changes