diff --git a/app/products/calls/actions/calls.test.ts b/app/products/calls/actions/calls.test.ts index 672787e82..bf9437d74 100644 --- a/app/products/calls/actions/calls.test.ts +++ b/app/products/calls/actions/calls.test.ts @@ -100,6 +100,7 @@ const addFakeCall = (serverUrl: string, channelId: string) => { describe('Actions.Calls', () => { const {newConnection} = require('@calls/connection/connection'); InCallManager.setSpeakerphoneOn = jest.fn(); + InCallManager.setForceSpeakerphoneOn = jest.fn(); // eslint-disable-next-line // @ts-ignore NetworkManager.getClient = () => mockClient; diff --git a/app/products/calls/actions/calls.ts b/app/products/calls/actions/calls.ts index c363eabef..10b083ce7 100644 --- a/app/products/calls/actions/calls.ts +++ b/app/products/calls/actions/calls.ts @@ -307,7 +307,7 @@ export const sendReaction = (emoji: CallReactionEmoji) => { }; export const setSpeakerphoneOn = (speakerphoneOn: boolean) => { - InCallManager.setSpeakerphoneOn(speakerphoneOn); + InCallManager.setForceSpeakerphoneOn(speakerphoneOn); setSpeakerPhone(speakerphoneOn); }; diff --git a/app/products/calls/connection/connection.ts b/app/products/calls/connection/connection.ts index e6bb5de32..36d308b3e 100644 --- a/app/products/calls/connection/connection.ts +++ b/app/products/calls/connection/connection.ts @@ -12,6 +12,7 @@ import { mediaDevices, } from 'react-native-webrtc'; +import {setSpeakerPhone} from '@calls/state'; import {getICEServersConfigs} from '@calls/utils'; import {WebsocketEvents} from '@constants'; import {getServerCredentials} from '@init/credentials'; @@ -203,8 +204,8 @@ export async function newConnection( } } - InCallManager.start({media: 'audio'}); - InCallManager.stopProximitySensor(); + InCallManager.start({media: 'video'}); + setSpeakerPhone(true); peer = new Peer(null, iceConfigs); peer.on('signal', (data: any) => {