Skip to content

Commit 28149a6

Browse files
author
evgeny-nadymov
committed
Fix media state
1 parent 909be45 commit 28149a6

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"homepage": "https://evgeny-nadymov.github.io/telegram-react",
33
"name": "telegram_react",
4-
"version": "0.0.984",
4+
"version": "0.0.985",
55
"private": true,
66
"dependencies": {
77
"tdweb": "^1.7.2",

src/Stores/CallStore.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,8 @@ class CallStore extends EventEmitter {
17931793
};
17941794
LOG_P2P_CALL('p2pJoinCall currentCall', this.currentCall);
17951795

1796+
const mediaState = this.p2pGetMediaState(id, 'input');
1797+
17961798
const inputStream = await navigator.mediaDevices.getUserMedia({
17971799
video: true,
17981800
audio: true
@@ -2076,22 +2078,10 @@ class CallStore extends EventEmitter {
20762078
let candidate = data;
20772079
if (UNIFY_CANDIDATE) {
20782080
data.candidates.forEach(x => {
2079-
// if (x.type === 'local') {
2080-
// x.type = 'host';
2081-
// } else if (x.type === 'relay') {
2082-
// x.component = 1;
2083-
// x.relAddress = {
2084-
// ip: '0.0.0.0',
2085-
// port: 0
2086-
// }
2087-
// }
2088-
20892081
candidate = P2PSdpBuilder.generateCandidate(x);
20902082
candidate.sdpMLineIndex = 0;
20912083

2092-
// if (x.type === 'relay') {
2093-
candidates.push(candidate);
2094-
// }
2084+
candidates.push(candidate);
20952085
});
20962086
}
20972087
if (candidates.length > 0) {

0 commit comments

Comments
 (0)