Skip to content

Commit

Permalink
Update to protocol v1.12
Browse files Browse the repository at this point in the history
Automatically convert wss scheme to https
  • Loading branch information
davidzhao committed Mar 21, 2024
1 parent 786de7e commit 87224df
Show file tree
Hide file tree
Showing 16 changed files with 114 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
livekit-server-sdk (0.6.0)
livekit-server-sdk (0.6.4)
google-protobuf (>= 3.21.0, < 4.0)
jwt (>= 2.2.3, < 3.0)
rack (>= 2.2.3, < 3.0)
Expand Down
13 changes: 7 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ task default: %i[spec]
desc "Generate protobuf stubs"
task :proto do
system("protoc",
"--proto_path=protocol",
"--proto_path=protocol/protobufs",
"--ruby_out=lib/livekit/proto",
"--twirp_ruby_out=lib/livekit/proto",
"-Iprotocol",
"./protocol/livekit_egress.proto",
"./protocol/livekit_ingress.proto",
"./protocol/livekit_models.proto",
"./protocol/livekit_room.proto",
"./protocol/livekit_webhook.proto")
"./protocol/protobufs/livekit_egress.proto",
"./protocol/protobufs/livekit_ingress.proto",
"./protocol/protobufs/livekit_sip.proto",
"./protocol/protobufs/livekit_models.proto",
"./protocol/protobufs/livekit_room.proto",
"./protocol/protobufs/livekit_webhook.proto")
end
3 changes: 2 additions & 1 deletion lib/livekit/egress_service_client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "livekit/proto/livekit_egress_twirp"
require "livekit/auth_mixin"
require 'livekit/utils'

module LiveKit
class EgressServiceClient < Twirp::Client
Expand All @@ -8,7 +9,7 @@ class EgressServiceClient < Twirp::Client
attr_accessor :api_key, :api_secret

def initialize(base_url, api_key: nil, api_secret: nil)
super(File.join(base_url, "/twirp"))
super(File.join(to_http_url(base_url), "/twirp"))
@api_key = api_key
@api_secret = api_secret
end
Expand Down
3 changes: 2 additions & 1 deletion lib/livekit/ingress_service_client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "livekit/proto/livekit_ingress_twirp"
require "livekit/auth_mixin"
require 'livekit/utils'

module LiveKit
class IngressServiceClient < Twirp::Client
Expand All @@ -8,7 +9,7 @@ class IngressServiceClient < Twirp::Client
attr_accessor :api_key, :api_secret

def initialize(base_url, api_key: nil, api_secret: nil)
super(File.join(base_url, "/twirp"))
super(File.join(to_http_url(base_url), "/twirp"))
@api_key = api_key
@api_secret = api_secret
end
Expand Down
6 changes: 3 additions & 3 deletions lib/livekit/proto/livekit_egress_pb.rb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion lib/livekit/proto/livekit_egress_twirp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class EgressService < ::Twirp::Service
rpc :StartTrackEgress, TrackEgressRequest, EgressInfo, :ruby_method => :start_track_egress
rpc :UpdateLayout, UpdateLayoutRequest, EgressInfo, :ruby_method => :update_layout
rpc :UpdateStream, UpdateStreamRequest, EgressInfo, :ruby_method => :update_stream
rpc :UpdateOutputs, UpdateOutputsRequest, EgressInfo, :ruby_method => :update_outputs
rpc :ListEgress, ListEgressRequest, ListEgressResponse, :ruby_method => :list_egress
rpc :StopEgress, StopEgressRequest, EgressInfo, :ruby_method => :stop_egress
end
Expand Down
4 changes: 2 additions & 2 deletions lib/livekit/proto/livekit_ingress_pb.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 87224df

Please sign in to comment.