lib/livekit/utils.rb in livekit-server-sdk-0.6.3 vs lib/livekit/utils.rb in livekit-server-sdk-0.6.4

- old
+ new

@@ -25,5 +25,15 @@ [k.to_sym, v_sym] end Hash[h] end end + +# convert websocket urls to http +def to_http_url(url) + if url.start_with?("ws") + # replace ws prefix to http + return url.sub(/^ws/, "http") + else + return url + end +end \ No newline at end of file