livekit-server-sdk 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/Gemfile.lock +2 -1
- data/README.md +1 -22
- data/bin/bootstrap.sh +0 -0
- data/lib/livekit/egress_service_client.rb +13 -10
- data/lib/livekit/grants.rb +2 -10
- data/lib/livekit/proto/livekit_webhook_pb.rb +0 -1
- data/lib/livekit/version.rb +1 -1
- metadata +3 -5
- data/.github/banner_dark.png +0 -0
- data/.github/banner_light.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c0af8d011a1a96a75436dd27ce5c7b589742a2ba2d8b92783800900b77ed9a
|
4
|
+
data.tar.gz: '08f6fba37c2a8caa53199222983bcc9fc68fceb21c77c9983dd5aafd64a75de5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a56e5d01778aee68272c42385c4c201a3ea6328643086ce16f608414c44f9664f6a9e717f16c2daaea8d6e2aba26f293d0a172777d1e1555e578bb250674b484
|
7
|
+
data.tar.gz: 387588e04efaf6b702d0998128ba322890093900e7d53981b5f8426e5e63968b7f010a69d29c4934dc110c4a6a83f2514503e167cfc7b56a6bad7d0d484c34eb
|
data/.gitignore
CHANGED
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.0)
|
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,6 +17,7 @@ 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)
|
20
21
|
jwt (2.7.0)
|
21
22
|
method_source (1.0.0)
|
22
23
|
pry (0.14.2)
|
data/README.md
CHANGED
@@ -1,14 +1,6 @@
|
|
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
|
-
|
9
1
|
# LiveKit Server API for Ruby
|
10
2
|
|
11
|
-
|
3
|
+
Ruby API for server-side integrations with LiveKit. This gem provides the ability to create access tokens as well as access RoomService.
|
12
4
|
|
13
5
|
This library is designed to work with Ruby 2.6.0 and above.
|
14
6
|
|
@@ -130,16 +122,3 @@ You may store credentials in environment variables. If api-key or api-secret is
|
|
130
122
|
## License
|
131
123
|
|
132
124
|
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
|
-
|
data/bin/bootstrap.sh
CHANGED
File without changes
|
@@ -144,18 +144,21 @@ module LiveKit
|
|
144
144
|
:UpdateStream,
|
145
145
|
Proto::UpdateStreamRequest.new(
|
146
146
|
egress_id: egress_id,
|
147
|
-
add_output_urls:
|
148
|
-
remove_output_urls:
|
147
|
+
add_output_urls: add_output_urls,
|
148
|
+
remove_output_urls: remove_output_urls,
|
149
149
|
),
|
150
150
|
headers: auth_header(roomRecord: true),
|
151
151
|
)
|
152
152
|
end
|
153
153
|
|
154
154
|
# list all egress or only egress for a room
|
155
|
-
def list_egress(
|
155
|
+
def list_egress(
|
156
|
+
room_name: nil,
|
157
|
+
active: false
|
158
|
+
)
|
156
159
|
self.rpc(
|
157
160
|
:ListEgress,
|
158
|
-
Proto::ListEgressRequest.new(room_name: room_name),
|
161
|
+
Proto::ListEgressRequest.new(room_name: room_name, active: active),
|
159
162
|
headers: auth_header(roomRecord: true),
|
160
163
|
)
|
161
164
|
end
|
@@ -177,24 +180,24 @@ module LiveKit
|
|
177
180
|
output.each do |out|
|
178
181
|
if out.is_a? LiveKit::Proto::EncodedFileOutput
|
179
182
|
raise "cannot add multiple file outputs" if request.file_outputs.any?
|
180
|
-
request.file_outputs = [out]
|
183
|
+
request.file_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::EncodedFileOutput, [out])
|
181
184
|
elsif out.is_a? LiveKit::Proto::SegmentedFileOutput
|
182
185
|
raise "cannot add multiple segmented file outputs" if request.segment_outputs.any?
|
183
|
-
request.segment_outputs = [out]
|
186
|
+
request.segment_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::SegmentedFileOutput, [out])
|
184
187
|
elsif out.is_a? Livekit::Proto::StreamOutput
|
185
188
|
raise "cannot add multiple stream outputs" if request.stream_outputs.any?
|
186
|
-
request.stream_outputs = [out]
|
189
|
+
request.stream_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::StreamOutput, [out])
|
187
190
|
end
|
188
191
|
end
|
189
192
|
elsif output.is_a? LiveKit::Proto::EncodedFileOutput
|
190
193
|
request.file = output
|
191
|
-
request.file_outputs = [output]
|
194
|
+
request.file_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::EncodedFileOutput, [output])
|
192
195
|
elsif output.is_a? LiveKit::Proto::SegmentedFileOutput
|
193
196
|
request.segments = output
|
194
|
-
request.segment_outputs = [output]
|
197
|
+
request.segment_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::SegmentedFileOutput, [output])
|
195
198
|
elsif output.is_a? LiveKit::Proto::StreamOutput
|
196
199
|
request.stream = output
|
197
|
-
request.stream_outputs = [output]
|
200
|
+
request.stream_outputs = Google::Protobuf::RepeatedField.new(:message, Proto::StreamOutput, [output])
|
198
201
|
end
|
199
202
|
end
|
200
203
|
end
|
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
|
-
:
|
37
|
+
:room, :canPublish, :canSubscribe, :canPublishData, :hidden, :recorder,
|
38
|
+
:ingressAdmin
|
39
39
|
|
40
40
|
def initialize(
|
41
41
|
# true if can create or delete rooms
|
@@ -52,14 +52,10 @@ 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,
|
57
55
|
# for join tokens, can participant subscribe, true by default
|
58
56
|
canSubscribe: nil,
|
59
57
|
# for join tokens, can participant publish data messages, true by default
|
60
58
|
canPublishData: nil,
|
61
|
-
# by default, a participant is not allowed to update its own metadata
|
62
|
-
canUpdateOwnMetadata: nil,
|
63
59
|
# if participant should remain invisible to others
|
64
60
|
hidden: nil,
|
65
61
|
# if participant is recording the room
|
@@ -74,10 +70,8 @@ module LiveKit
|
|
74
70
|
@roomAdmin = roomAdmin
|
75
71
|
@room = room
|
76
72
|
@canPublish = canPublish
|
77
|
-
@canPublishSources = canPublishSources
|
78
73
|
@canSubscribe = canSubscribe
|
79
74
|
@canPublishData = canPublishData
|
80
|
-
@canUpdateOwnMetadata = canUpdateOwnMetadata
|
81
75
|
@hidden = hidden
|
82
76
|
@recorder = recorder
|
83
77
|
@ingressAdmin = ingressAdmin
|
@@ -96,10 +90,8 @@ module LiveKit
|
|
96
90
|
roomAdmin: hash["roomAdmin"],
|
97
91
|
room: hash["room"],
|
98
92
|
canPublish: hash["canPublish"],
|
99
|
-
canPublishSources: hash["canPublishSources"],
|
100
93
|
canSubscribe: hash["canSubscribe"],
|
101
94
|
canPublishData: hash["canPublishData"],
|
102
|
-
canUpdateOwnMetadata: hash["canUpdateOwnMetadata"],
|
103
95
|
hidden: hash["hidden"],
|
104
96
|
recorder: hash["recorder"],
|
105
97
|
ingressAdmin: hash["ingressAdmin"]
|
data/lib/livekit/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Omri Gabay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-protobuf
|
@@ -100,8 +100,6 @@ extensions: []
|
|
100
100
|
extra_rdoc_files: []
|
101
101
|
files:
|
102
102
|
- ".editorconfig"
|
103
|
-
- ".github/banner_dark.png"
|
104
|
-
- ".github/banner_light.png"
|
105
103
|
- ".github/workflows/test.yml"
|
106
104
|
- ".gitignore"
|
107
105
|
- ".gitmodules"
|
@@ -172,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
170
|
- !ruby/object:Gem::Version
|
173
171
|
version: '0'
|
174
172
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
173
|
+
rubygems_version: 3.4.6
|
176
174
|
signing_key:
|
177
175
|
specification_version: 4
|
178
176
|
summary: LiveKit Server SDK for Ruby
|
data/.github/banner_dark.png
DELETED
Binary file
|
data/.github/banner_light.png
DELETED
Binary file
|