forked from Ivasoft/mattermost-mobile
MM-46999 - Calls: Start call in speaker mode (#6979)
This commit is contained in:
committed by
GitHub
parent
6c9c025d25
commit
e140a12b6c
@@ -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;
|
||||
|
||||
@@ -307,7 +307,7 @@ export const sendReaction = (emoji: CallReactionEmoji) => {
|
||||
};
|
||||
|
||||
export const setSpeakerphoneOn = (speakerphoneOn: boolean) => {
|
||||
InCallManager.setSpeakerphoneOn(speakerphoneOn);
|
||||
InCallManager.setForceSpeakerphoneOn(speakerphoneOn);
|
||||
setSpeakerPhone(speakerphoneOn);
|
||||
};
|
||||
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user