Disconnect from live-kit Room
on drop
This commit is contained in:
parent
47be340cac
commit
9cf39b1da6
3 changed files with 19 additions and 2 deletions
|
@ -43,6 +43,7 @@ extern "C" {
|
|||
callback: extern "C" fn(*mut c_void, CFStringRef),
|
||||
callback_data: *mut c_void,
|
||||
);
|
||||
fn LKRoomDisconnect(room: *const c_void);
|
||||
fn LKRoomPublishVideoTrack(
|
||||
room: *const c_void,
|
||||
track: *const c_void,
|
||||
|
@ -195,7 +196,10 @@ impl Room {
|
|||
|
||||
impl Drop for Room {
|
||||
fn drop(&mut self) {
|
||||
unsafe { LKRelease(self.native_room) }
|
||||
unsafe {
|
||||
LKRoomDisconnect(self.native_room);
|
||||
LKRelease(self.native_room);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue