Skip to content

Commit

Permalink
Fix media state
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-nadymov committed Apr 6, 2021
1 parent 909be45 commit 28149a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://evgeny-nadymov.github.io/telegram-react",
"name": "telegram_react",
"version": "0.0.984",
"version": "0.0.985",
"private": true,
"dependencies": {
"tdweb": "^1.7.2",
Expand Down
16 changes: 3 additions & 13 deletions src/Stores/CallStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,8 @@ class CallStore extends EventEmitter {
};
LOG_P2P_CALL('p2pJoinCall currentCall', this.currentCall);

const mediaState = this.p2pGetMediaState(id, 'input');

const inputStream = await navigator.mediaDevices.getUserMedia({
video: true,
audio: true
Expand Down Expand Up @@ -2076,22 +2078,10 @@ class CallStore extends EventEmitter {
let candidate = data;
if (UNIFY_CANDIDATE) {
data.candidates.forEach(x => {
// if (x.type === 'local') {
// x.type = 'host';
// } else if (x.type === 'relay') {
// x.component = 1;
// x.relAddress = {
// ip: '0.0.0.0',
// port: 0
// }
// }

candidate = P2PSdpBuilder.generateCandidate(x);
candidate.sdpMLineIndex = 0;

// if (x.type === 'relay') {
candidates.push(candidate);
// }
candidates.push(candidate);
});
}
if (candidates.length > 0) {
Expand Down

0 comments on commit 28149a6

Please sign in to comment.