mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
fixing mute issue on speaker phone
This commit is contained in:
parent
b03c1b0249
commit
25b1913e8e
@ -104,7 +104,8 @@ export function useRingContext() {
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
Alert.alert('webrtc error', err.toString());
|
||||
console.log(err);
|
||||
//Alert.alert('webrtc error', err.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +154,8 @@ export function useRingContext() {
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
Alert.alert('webrtc error', err.toString());
|
||||
console.log(err);
|
||||
//Alert.alert('webrtc error', err.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -468,11 +470,17 @@ export function useRingContext() {
|
||||
});
|
||||
for (const track of stream.getTracks()) {
|
||||
if (track.kind === 'audio') {
|
||||
if (audioTrack.current) {
|
||||
audioTrack.current.stop();
|
||||
}
|
||||
audioTrack.current = track;
|
||||
pc.current.addTrack(track, stream);
|
||||
updateState({ localAudio: true });
|
||||
}
|
||||
if (track.kind === 'video') {
|
||||
if (videoTrack.current) {
|
||||
videoTrack.current.stop();
|
||||
}
|
||||
videoTrack.current = track;
|
||||
pc.current.addTrack(track, stream);
|
||||
InCallManager.setForceSpeakerphoneOn(true);
|
||||
|
Loading…
Reference in New Issue
Block a user