diff --git a/livekit-api/livekit/api/_twirp_client.py b/livekit-api/livekit/api/_twirp_client.py index 55deab8b..09f726ab 100644 --- a/livekit-api/livekit/api/_twirp_client.py +++ b/livekit-api/livekit/api/_twirp_client.py @@ -54,7 +54,11 @@ class TwirpErrorCode: class TwirpClient: def __init__(self, host: str, pkg: str, prefix: str = DEFAULT_PREFIX) -> None: parse_res = urlparse(host) - host = f"http://{parse_res.netloc}/{parse_res.path}" + scheme = parse_res.scheme + if scheme.startswith("ws"): + scheme = scheme.replace("ws", "http") + + host = f"{scheme}://{parse_res.netloc}/{parse_res.path}" self.host = host.rstrip("/") self.pkg = pkg self.prefix = prefix diff --git a/livekit-api/livekit/api/version.py b/livekit-api/livekit/api/version.py index b3f47562..ae736254 100644 --- a/livekit-api/livekit/api/version.py +++ b/livekit-api/livekit/api/version.py @@ -1 +1 @@ -__version__ = "0.1.2" +__version__ = "0.1.3"