Skip to content

Commit d879342

Browse files
resources.path -> resources.files (#134)
1 parent 8eea946 commit d879342

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

livekit-rtc/livekit/rtc/_ffi_client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ def get_ffi_lib():
4545
Set LIVEKIT_LIB_PATH to specify a the lib path"
4646
)
4747

48-
with importlib.resources.path("livekit.rtc.resources", libname) as resource_path:
49-
ffi_lib = ctypes.CDLL(resource_path)
48+
with importlib.resources.files("livekit.rtc.resources").joinpath(
49+
libname
50+
) as lib_path:
51+
# Convert the Traversable object to a string path for ctypes
52+
ffi_lib = ctypes.CDLL(str(lib_path))
5053
return ffi_lib
5154

5255

0 commit comments

Comments
 (0)