livekit-server-sdk 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/banner_dark.png +0 -0
- data/.github/banner_light.png +0 -0
- data/Gemfile.lock +1 -2
- data/README.md +22 -1
- data/lib/livekit/egress_service_client.rb +4 -1
- data/lib/livekit/grants.rb +10 -2
- data/lib/livekit/ingress_service_client.rb +8 -3
- data/lib/livekit/proto/livekit_egress_pb.rb +1 -0
- data/lib/livekit/proto/livekit_ingress_pb.rb +4 -0
- data/lib/livekit/proto/livekit_models_pb.rb +10 -0
- data/lib/livekit/proto/livekit_webhook_pb.rb +1 -0
- data/lib/livekit/version.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aeefcd6261651616958b5ce4bcae8b16a90d655684786d64f8c0d5f0b1c77550
|
|
4
|
+
data.tar.gz: 4aaa7825155508e4595d96051df098124401d16f7a2e36e0a1812b93e9f9b1c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 398a4cb7de533fe4585d1b3ca8ee087261170c9b90d5822e8b70c7261d20d93ac1998118b5a559057b7eaa00cf44bbf935c6d64cb416f09bf2ee111b6177760b
|
|
7
|
+
data.tar.gz: f591ff5488228ca9b68c1da4277b3eb356f549f6005afa027a5f4fd0522f3298d528879d71f24e3cc369b0cca270a6ef16e99fa964a4d433d0015632161230b4
|
|
Binary file
|
|
Binary file
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
livekit-server-sdk (0.5.
|
|
4
|
+
livekit-server-sdk (0.5.3)
|
|
5
5
|
google-protobuf (>= 3.21.0, < 4.0)
|
|
6
6
|
jwt (>= 2.2.3, < 3.0)
|
|
7
7
|
rack (>= 2.2.3, < 3.0)
|
|
@@ -17,7 +17,6 @@ GEM
|
|
|
17
17
|
ruby2_keywords (>= 0.0.4)
|
|
18
18
|
faraday-net_http (3.0.2)
|
|
19
19
|
google-protobuf (3.22.2)
|
|
20
|
-
google-protobuf (3.22.2-x86_64-linux)
|
|
21
20
|
jwt (2.7.0)
|
|
22
21
|
method_source (1.0.0)
|
|
23
22
|
pry (0.14.2)
|
data/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
<!--BEGIN_BANNER_IMAGE-->
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="/.github/banner_dark.png">
|
|
4
|
+
<source media="(prefers-color-scheme: light)" srcset="/.github/banner_light.png">
|
|
5
|
+
<img style="width:100%;" alt="The LiveKit icon, the name of the repository and some sample code in the background." src="/.github/banner_light.png">
|
|
6
|
+
</picture>
|
|
7
|
+
<!--END_BANNER_IMAGE-->
|
|
8
|
+
|
|
1
9
|
# LiveKit Server API for Ruby
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
<!--BEGIN_DESCRIPTION-->Use this SDK to manage <a href="https://livekit.io/">LiveKit</a> rooms and create access tokens from your Ruby backend.<!--END_DESCRIPTION-->
|
|
4
12
|
|
|
5
13
|
This library is designed to work with Ruby 2.6.0 and above.
|
|
6
14
|
|
|
@@ -122,3 +130,16 @@ You may store credentials in environment variables. If api-key or api-secret is
|
|
|
122
130
|
## License
|
|
123
131
|
|
|
124
132
|
The gem is available as open source under the terms of Apache 2.0 License.
|
|
133
|
+
|
|
134
|
+
<!--BEGIN_REPO_NAV-->
|
|
135
|
+
<br/><table>
|
|
136
|
+
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
|
|
137
|
+
<tbody>
|
|
138
|
+
<tr><td>Client SDKs</td><td><a href="https://github.com/livekit/components-js">Components</a> · <a href="https://github.com/livekit/client-sdk-js">JavaScript</a> · <a href="https://github.com/livekit/client-sdk-rust">Rust</a> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (web)</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native (beta)</a></td></tr><tr></tr>
|
|
139
|
+
<tr><td>Server SDKs</td><td><a href="https://github.com/livekit/server-sdk-js">Node.js</a> · <a href="https://github.com/livekit/server-sdk-go">Golang</a> · <b>Ruby</b> · <a href="https://github.com/livekit/server-sdk-kotlin">Java/Kotlin</a> · <a href="https://github.com/agence104/livekit-server-sdk-php">PHP (community)</a> · <a href="https://github.com/tradablebits/livekit-server-sdk-python">Python (community)</a></td></tr><tr></tr>
|
|
140
|
+
<tr><td>Services</td><td><a href="https://github.com/livekit/livekit">Livekit server</a> · <a href="https://github.com/livekit/egress">Egress</a> · <a href="https://github.com/livekit/ingress">Ingress</a></td></tr><tr></tr>
|
|
141
|
+
<tr><td>Resources</td><td><a href="https://docs.livekit.io">Docs</a> · <a href="https://github.com/livekit-examples">Example apps</a> · <a href="https://livekit.io/cloud">Cloud</a> · <a href="https://docs.livekit.io/oss/deployment">Self-hosting</a> · <a href="https://github.com/livekit/livekit-cli">CLI</a></td></tr>
|
|
142
|
+
</tbody>
|
|
143
|
+
</table>
|
|
144
|
+
<!--END_REPO_NAV-->
|
|
145
|
+
|
|
@@ -108,7 +108,9 @@ module LiveKit
|
|
|
108
108
|
# true to record only audio
|
|
109
109
|
audio_only: false,
|
|
110
110
|
# true to record only video
|
|
111
|
-
video_only: false
|
|
111
|
+
video_only: false,
|
|
112
|
+
# true to await START_RECORDING chrome log
|
|
113
|
+
await_start_signal: false
|
|
112
114
|
)
|
|
113
115
|
request = Proto::WebEgressRequest.new(
|
|
114
116
|
url: url,
|
|
@@ -116,6 +118,7 @@ module LiveKit
|
|
|
116
118
|
advanced: advanced,
|
|
117
119
|
audio_only: audio_only,
|
|
118
120
|
video_only: video_only,
|
|
121
|
+
await_start_signal: await_start_signal,
|
|
119
122
|
)
|
|
120
123
|
self.set_output(request, output)
|
|
121
124
|
self.rpc(
|
data/lib/livekit/grants.rb
CHANGED
|
@@ -34,8 +34,8 @@ module LiveKit
|
|
|
34
34
|
|
|
35
35
|
class VideoGrant
|
|
36
36
|
attr_accessor :roomCreate, :roomJoin, :roomList, :roomRecord, :roomAdmin,
|
|
37
|
-
:room, :canPublish, :
|
|
38
|
-
:ingressAdmin
|
|
37
|
+
:room, :canPublish, :canPublishSources, :canSubscribe, :canPublishData,
|
|
38
|
+
:canUpdateOwnMetadata, :hidden, :recorder, :ingressAdmin
|
|
39
39
|
|
|
40
40
|
def initialize(
|
|
41
41
|
# true if can create or delete rooms
|
|
@@ -52,10 +52,14 @@ module LiveKit
|
|
|
52
52
|
room: nil,
|
|
53
53
|
# for join tokens, can participant publish, true by default
|
|
54
54
|
canPublish: nil,
|
|
55
|
+
# TrackSource types that a participant may publish
|
|
56
|
+
canPublishSources: nil,
|
|
55
57
|
# for join tokens, can participant subscribe, true by default
|
|
56
58
|
canSubscribe: nil,
|
|
57
59
|
# for join tokens, can participant publish data messages, true by default
|
|
58
60
|
canPublishData: nil,
|
|
61
|
+
# by default, a participant is not allowed to update its own metadata
|
|
62
|
+
canUpdateOwnMetadata: nil,
|
|
59
63
|
# if participant should remain invisible to others
|
|
60
64
|
hidden: nil,
|
|
61
65
|
# if participant is recording the room
|
|
@@ -70,8 +74,10 @@ module LiveKit
|
|
|
70
74
|
@roomAdmin = roomAdmin
|
|
71
75
|
@room = room
|
|
72
76
|
@canPublish = canPublish
|
|
77
|
+
@canPublishSources = canPublishSources
|
|
73
78
|
@canSubscribe = canSubscribe
|
|
74
79
|
@canPublishData = canPublishData
|
|
80
|
+
@canUpdateOwnMetadata = canUpdateOwnMetadata
|
|
75
81
|
@hidden = hidden
|
|
76
82
|
@recorder = recorder
|
|
77
83
|
@ingressAdmin = ingressAdmin
|
|
@@ -90,8 +96,10 @@ module LiveKit
|
|
|
90
96
|
roomAdmin: hash["roomAdmin"],
|
|
91
97
|
room: hash["room"],
|
|
92
98
|
canPublish: hash["canPublish"],
|
|
99
|
+
canPublishSources: hash["canPublishSources"],
|
|
93
100
|
canSubscribe: hash["canSubscribe"],
|
|
94
101
|
canPublishData: hash["canPublishData"],
|
|
102
|
+
canUpdateOwnMetadata: hash["canUpdateOwnMetadata"],
|
|
95
103
|
hidden: hash["hidden"],
|
|
96
104
|
recorder: hash["recorder"],
|
|
97
105
|
ingressAdmin: hash["ingressAdmin"]
|
|
@@ -14,7 +14,6 @@ module LiveKit
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def create_ingress(
|
|
17
|
-
# currently :RTMP_INPUT is the only supported type
|
|
18
17
|
input_type,
|
|
19
18
|
# optional, name to identify the ingress
|
|
20
19
|
name: nil,
|
|
@@ -27,7 +26,9 @@ module LiveKit
|
|
|
27
26
|
# optional, LiveKit::Proto::IngressAudioOptions
|
|
28
27
|
audio: nil,
|
|
29
28
|
# optional, LiveKit::Proto::IngressVideoOptions
|
|
30
|
-
video: nil
|
|
29
|
+
video: nil,
|
|
30
|
+
# optional, whether to forward input media unprocessed, for WHIP only
|
|
31
|
+
bypass_transcoding: nil
|
|
31
32
|
)
|
|
32
33
|
request = Proto::CreateIngressRequest.new(
|
|
33
34
|
input_type: input_type,
|
|
@@ -37,6 +38,7 @@ module LiveKit
|
|
|
37
38
|
participant_name: participant_name,
|
|
38
39
|
audio: audio,
|
|
39
40
|
video: video,
|
|
41
|
+
bypass_transcoding: bypass_transcoding,
|
|
40
42
|
)
|
|
41
43
|
self.rpc(
|
|
42
44
|
:CreateIngress,
|
|
@@ -58,7 +60,9 @@ module LiveKit
|
|
|
58
60
|
# optional, LiveKit::Proto::IngressAudioOptions
|
|
59
61
|
audio: nil,
|
|
60
62
|
# optional, LiveKit::Proto::IngressVideoOptions
|
|
61
|
-
video: nil
|
|
63
|
+
video: nil,
|
|
64
|
+
# optional, whether to forward input media unprocessed, for WHIP only
|
|
65
|
+
bypass_transcoding: nil
|
|
62
66
|
)
|
|
63
67
|
request = Proto::UpdateIngressRequest.new(
|
|
64
68
|
ingress_id: ingress_id,
|
|
@@ -68,6 +72,7 @@ module LiveKit
|
|
|
68
72
|
participant_name: participant_name,
|
|
69
73
|
audio: audio,
|
|
70
74
|
video: video,
|
|
75
|
+
bypass_transcoding: bypass_transcoding,
|
|
71
76
|
)
|
|
72
77
|
self.rpc(
|
|
73
78
|
:UpdateIngress,
|
|
@@ -30,6 +30,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
30
30
|
optional :url, :string, 1
|
|
31
31
|
optional :audio_only, :bool, 2
|
|
32
32
|
optional :video_only, :bool, 3
|
|
33
|
+
optional :await_start_signal, :bool, 12
|
|
33
34
|
repeated :file_outputs, :message, 9, "livekit.EncodedFileOutput"
|
|
34
35
|
repeated :stream_outputs, :message, 10, "livekit.StreamOutput"
|
|
35
36
|
repeated :segment_outputs, :message, 11, "livekit.SegmentedFileOutput"
|
|
@@ -13,6 +13,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
13
13
|
optional :room_name, :string, 3
|
|
14
14
|
optional :participant_identity, :string, 4
|
|
15
15
|
optional :participant_name, :string, 5
|
|
16
|
+
optional :bypass_transcoding, :bool, 8
|
|
16
17
|
optional :audio, :message, 6, "livekit.IngressAudioOptions"
|
|
17
18
|
optional :video, :message, 7, "livekit.IngressVideoOptions"
|
|
18
19
|
end
|
|
@@ -49,6 +50,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
49
50
|
optional :stream_key, :string, 3
|
|
50
51
|
optional :url, :string, 4
|
|
51
52
|
optional :input_type, :enum, 5, "livekit.IngressInput"
|
|
53
|
+
optional :bypass_transcoding, :bool, 13
|
|
52
54
|
optional :audio, :message, 6, "livekit.IngressAudioOptions"
|
|
53
55
|
optional :video, :message, 7, "livekit.IngressVideoOptions"
|
|
54
56
|
optional :room_name, :string, 8
|
|
@@ -90,6 +92,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
90
92
|
optional :room_name, :string, 3
|
|
91
93
|
optional :participant_identity, :string, 4
|
|
92
94
|
optional :participant_name, :string, 5
|
|
95
|
+
proto3_optional :bypass_transcoding, :bool, 8
|
|
93
96
|
optional :audio, :message, 6, "livekit.IngressAudioOptions"
|
|
94
97
|
optional :video, :message, 7, "livekit.IngressVideoOptions"
|
|
95
98
|
end
|
|
@@ -104,6 +107,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
104
107
|
end
|
|
105
108
|
add_enum "livekit.IngressInput" do
|
|
106
109
|
value :RTMP_INPUT, 0
|
|
110
|
+
value :WHIP_INPUT, 1
|
|
107
111
|
end
|
|
108
112
|
add_enum "livekit.IngressAudioEncodingPreset" do
|
|
109
113
|
value :OPUS_STEREO_96KBPS, 0
|
|
@@ -17,6 +17,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
17
17
|
repeated :enabled_codecs, :message, 7, "livekit.Codec"
|
|
18
18
|
optional :metadata, :string, 8
|
|
19
19
|
optional :num_participants, :uint32, 9
|
|
20
|
+
optional :num_publishers, :uint32, 11
|
|
20
21
|
optional :active_recording, :bool, 10
|
|
21
22
|
end
|
|
22
23
|
add_message "livekit.Codec" do
|
|
@@ -165,6 +166,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
165
166
|
end
|
|
166
167
|
add_message "livekit.DisabledCodecs" do
|
|
167
168
|
repeated :codecs, :message, 1, "livekit.Codec"
|
|
169
|
+
repeated :publish, :message, 2, "livekit.Codec"
|
|
168
170
|
end
|
|
169
171
|
add_message "livekit.RTPStats" do
|
|
170
172
|
optional :start_time, :message, 1, "google.protobuf.Timestamp"
|
|
@@ -208,6 +210,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
208
210
|
optional :last_key_frame, :message, 34, "google.protobuf.Timestamp"
|
|
209
211
|
optional :layer_lock_plis, :uint32, 35
|
|
210
212
|
optional :last_layer_lock_pli, :message, 36, "google.protobuf.Timestamp"
|
|
213
|
+
optional :sample_rate, :double, 42
|
|
214
|
+
optional :drift_ms, :double, 43
|
|
211
215
|
end
|
|
212
216
|
add_message "livekit.TimedVersion" do
|
|
213
217
|
optional :unix_micro, :int64, 1
|
|
@@ -270,6 +274,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
|
270
274
|
value :RR_SUBSCRIBER_FAILED, 3
|
|
271
275
|
value :RR_SWITCH_CANDIDATE, 4
|
|
272
276
|
end
|
|
277
|
+
add_enum "livekit.SubscriptionError" do
|
|
278
|
+
value :SE_UNKOWN, 0
|
|
279
|
+
value :SE_CODEC_UNSUPPORTED, 1
|
|
280
|
+
value :SE_TRACK_NOTFOUND, 2
|
|
281
|
+
end
|
|
273
282
|
end
|
|
274
283
|
end
|
|
275
284
|
|
|
@@ -309,5 +318,6 @@ module LiveKit
|
|
|
309
318
|
ClientConfigSetting = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ClientConfigSetting").enummodule
|
|
310
319
|
DisconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.DisconnectReason").enummodule
|
|
311
320
|
ReconnectReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.ReconnectReason").enummodule
|
|
321
|
+
SubscriptionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("livekit.SubscriptionError").enummodule
|
|
312
322
|
end
|
|
313
323
|
end
|
data/lib/livekit/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: livekit-server-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Omri Gabay
|
|
8
8
|
- David Zhao
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2023-
|
|
12
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: google-protobuf
|
|
@@ -91,7 +91,7 @@ dependencies:
|
|
|
91
91
|
- - "<"
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
93
|
version: '2.0'
|
|
94
|
-
description:
|
|
94
|
+
description:
|
|
95
95
|
email:
|
|
96
96
|
- omri@omrigabay.me
|
|
97
97
|
- dz@livekit.io
|
|
@@ -100,6 +100,8 @@ extensions: []
|
|
|
100
100
|
extra_rdoc_files: []
|
|
101
101
|
files:
|
|
102
102
|
- ".editorconfig"
|
|
103
|
+
- ".github/banner_dark.png"
|
|
104
|
+
- ".github/banner_light.png"
|
|
103
105
|
- ".github/workflows/test.yml"
|
|
104
106
|
- ".gitignore"
|
|
105
107
|
- ".gitmodules"
|
|
@@ -155,7 +157,7 @@ homepage: https://livekit.io
|
|
|
155
157
|
licenses:
|
|
156
158
|
- Apache-2.0
|
|
157
159
|
metadata: {}
|
|
158
|
-
post_install_message:
|
|
160
|
+
post_install_message:
|
|
159
161
|
rdoc_options: []
|
|
160
162
|
require_paths:
|
|
161
163
|
- lib
|
|
@@ -170,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
170
172
|
- !ruby/object:Gem::Version
|
|
171
173
|
version: '0'
|
|
172
174
|
requirements: []
|
|
173
|
-
rubygems_version: 3.
|
|
174
|
-
signing_key:
|
|
175
|
+
rubygems_version: 3.0.3.1
|
|
176
|
+
signing_key:
|
|
175
177
|
specification_version: 4
|
|
176
178
|
summary: LiveKit Server SDK for Ruby
|
|
177
179
|
test_files: []
|