livekit-server-sdk 0.6.5 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/livekit/grants.rb +2 -0
- data/lib/livekit/utils.rb +15 -24
- data/lib/livekit/version.rb +1 -1
- data/lib/livekit.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950430d5fc1b522fda62abc8c9707f7de403a17d3353d42d4bb4b15d68bfb695
|
4
|
+
data.tar.gz: 3efddda0ca44ce7a2a83e9f666007a0e0c60db906002a1dadd8d791332c9c24e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9beb92184c2325fa57199e14767e0f05167fec5e013409f720f8d0078b4b8813601142302bdba0cbe0eb51b3126b34f39ac920195d693eef930895ba64e4c23e
|
7
|
+
data.tar.gz: 51b25872d8b0a886bff874a73058f3647e119ddcd14ce8d57b805498f549a7b47918a200167532e3314844065149a66a95ef0283757ba674f7b8a2c7a1b3bf55
|
data/lib/livekit/grants.rb
CHANGED
@@ -35,6 +35,8 @@ module LiveKit
|
|
35
35
|
end
|
36
36
|
|
37
37
|
class VideoGrant
|
38
|
+
using LiveKit::Utils::StringifyKeysRefinement
|
39
|
+
|
38
40
|
attr_accessor :roomCreate, :roomJoin, :roomList, :roomRecord, :roomAdmin,
|
39
41
|
:room, :canPublish, :canPublishSources, :canSubscribe, :canPublishData,
|
40
42
|
:canUpdateOwnMetadata, :hidden, :recorder, :ingressAdmin
|
data/lib/livekit/utils.rb
CHANGED
@@ -1,35 +1,26 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
unless Hash.method_defined?(:stringify_keys)
|
4
|
-
class Hash
|
5
|
-
# via https://stackoverflow.com/a/25835016/2257038
|
6
|
-
def stringify_keys
|
7
|
-
h = self.map do |k, v|
|
8
|
-
v_str = if v.instance_of? Hash
|
9
|
-
v.stringify_keys
|
10
|
-
else
|
11
|
-
v
|
12
|
-
end
|
13
|
-
|
14
|
-
[k.to_s, v_str]
|
15
|
-
end
|
16
|
-
Hash[h]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
3
|
module LiveKit
|
22
4
|
module Utils
|
5
|
+
# Utility function to convert WebSocket URLs to HTTP URLs
|
23
6
|
def to_http_url(url)
|
24
7
|
if url.start_with?("ws")
|
25
|
-
#
|
26
|
-
|
8
|
+
# Replace 'ws' prefix with 'http'
|
9
|
+
url.sub(/^ws/, "http")
|
27
10
|
else
|
28
|
-
|
11
|
+
url
|
29
12
|
end
|
30
13
|
end
|
31
|
-
|
32
14
|
module_function :to_http_url
|
15
|
+
|
16
|
+
module StringifyKeysRefinement
|
17
|
+
refine Hash do
|
18
|
+
def stringify_keys
|
19
|
+
transform_keys(&:to_s).transform_values do |value|
|
20
|
+
value.is_a?(Hash) ? value.stringify_keys : value
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
33
25
|
end
|
34
|
-
end
|
35
|
-
# convert websocket urls to http
|
26
|
+
end
|
data/lib/livekit/version.rb
CHANGED
data/lib/livekit.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "livekit/access_token"
|
4
|
+
require "livekit/utils"
|
4
5
|
require "livekit/grants"
|
5
6
|
require "livekit/token_verifier"
|
6
|
-
require "livekit/utils"
|
7
7
|
require "livekit/version"
|
8
8
|
|
9
9
|
# required since generated protobufs does use `require` instead of `require_relative`
|
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.6.
|
4
|
+
version: 0.6.6
|
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: 2024-
|
12
|
+
date: 2024-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-protobuf
|
@@ -85,7 +85,7 @@ dependencies:
|
|
85
85
|
- - "<"
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '2.0'
|
88
|
-
description:
|
88
|
+
description:
|
89
89
|
email:
|
90
90
|
- omri@omrigabay.me
|
91
91
|
- dz@livekit.io
|
@@ -154,7 +154,7 @@ homepage: https://livekit.io
|
|
154
154
|
licenses:
|
155
155
|
- Apache-2.0
|
156
156
|
metadata: {}
|
157
|
-
post_install_message:
|
157
|
+
post_install_message:
|
158
158
|
rdoc_options: []
|
159
159
|
require_paths:
|
160
160
|
- lib
|
@@ -169,8 +169,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
173
|
-
signing_key:
|
172
|
+
rubygems_version: 3.3.7
|
173
|
+
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: LiveKit Server SDK for Ruby
|
176
176
|
test_files: []
|