Skip to content

Commit

Permalink
resources.path -> resources.files (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
keepingitneil authored Jan 11, 2024
1 parent 8eea946 commit d879342
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions livekit-rtc/livekit/rtc/_ffi_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ def get_ffi_lib():
Set LIVEKIT_LIB_PATH to specify a the lib path"
)

with importlib.resources.path("livekit.rtc.resources", libname) as resource_path:
ffi_lib = ctypes.CDLL(resource_path)
with importlib.resources.files("livekit.rtc.resources").joinpath(
libname
) as lib_path:
# Convert the Traversable object to a string path for ctypes
ffi_lib = ctypes.CDLL(str(lib_path))
return ffi_lib


Expand Down

0 comments on commit d879342

Please sign in to comment.