Skip to content

Commit 8f2d247

Browse files
committed
fix bugs
1 parent 94ea6fe commit 8f2d247

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools">
23

34
<uses-permission android:name="android.permission.INTERNET" />
45

@@ -26,6 +27,8 @@
2627

2728
<service
2829
android:name="app.notifee.core.ForegroundService"
30+
android:stopWithTask="true"
31+
tools:replace="android:stopWithTask"
2932
android:foregroundServiceType="microphone"
3033
android:exported="false" />
3134

src/CallProvider.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ export const CallProvider = (props: { children: JSX.Element }) => {
296296
audio: true,
297297
video: false,
298298
});
299-
console.log('stream tracks:', stream.getTracks());
300-
console.log('track enabled:', stream.getTracks()[0]?.enabled);
301-
console.log('track muted:', stream.getTracks()[0]?.muted);
299+
302300
micStreamRef.current = stream;
303301
inCallManager.start({ media: 'audio' });
304302

@@ -325,6 +323,7 @@ export const CallProvider = (props: { children: JSX.Element }) => {
325323
);
326324

327325
const endCall = useCallback(async () => {
326+
if (!joinedChannelId) return;
328327
leaveCall();
329328

330329
const token = await getUserToken();

src/components/CustomWebView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ export const CustomWebView = forwardRef<CustomWebViewRef, CustomWebViewProps>(
294294
TrackPlayer.pause();
295295
}
296296
if (event === 'logout') {
297+
call.endCall();
297298
console.log('logged out');
298299
socket?.removeAllListeners();
299300
socket?.disconnect();

0 commit comments

Comments
 (0)