Skip to content

Commit 8e99105

Browse files
author
evgeny-nadymov
committed
Fix candidate raddr/rport
1 parent f7621a0 commit 8e99105

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
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.973",
4+
"version": "0.0.975",
55
"private": true,
66
"dependencies": {
77
"tdweb": "^1.7.2",

src/Calls/P2P/P2PSdpBuilder.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export function p2pParseCandidate(candidate) {
3535
c.type = other[i + 1];
3636
break;
3737
}
38-
case 'rel-addr': {
38+
case 'raddr': {
3939
c.relAddr = other[i + 1];
4040
break;
4141
}
42-
case 'rel-port': {
42+
case 'rport': {
4343
c.relPort = other[i + 1];
4444
break;
4545
}
@@ -336,10 +336,10 @@ export class P2PSdpBuilder {
336336
attrs.push(`typ ${type}`);
337337
}
338338
if (relAddr) {
339-
attrs.push(`rel-addr ${relAddr}`);
339+
attrs.push(`raddr ${relAddr}`);
340340
}
341341
if (relPort) {
342-
attrs.push(`rel-port ${relPort}`);
342+
attrs.push(`rport ${relPort}`);
343343
}
344344
if (generation) {
345345
attrs.push(`generation ${generation}`);

src/Components/Calls/CallPanel.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ import GroupCallSettings from './GroupCallSettings';
2222
import MenuIcon from '../../Assets/Icons/More';
2323
import MicIcon from '../../Assets/Icons/Mic';
2424
import MicOffIcon from '../../Assets/Icons/MicOff';
25+
import { closeCallPanel } from '../../Actions/Call';
2526
import { p2pGetCallStatus, p2pIsCallReady } from '../../Calls/Utils';
2627
import { getUserFullName } from '../../Utils/User';
2728
import { stopPropagation } from '../../Utils/Message';
2829
import CallStore from '../../Stores/CallStore';
2930
import LStore from '../../Stores/LocalizationStore';
3031
import UserStore from '../../Stores/UserStore';
3132
import './CallPanel.css';
32-
import { closeCallPanel } from '../../Actions/Call';
3333

3434
class CallPanel extends React.Component {
3535
constructor(props) {
@@ -117,7 +117,9 @@ class CallPanel extends React.Component {
117117
};
118118

119119
handleDiscard = async event => {
120-
event.stopPropagation();
120+
if (event) {
121+
event.stopPropagation();
122+
}
121123

122124
const { callId } = this.props;
123125
if (!callId) return;
@@ -145,9 +147,7 @@ class CallPanel extends React.Component {
145147
};
146148

147149
handleClose = () => {
148-
const { callId } = this.props;
149-
150-
CallStore.p2pHangUp(callId, true);
150+
this.handleDiscard(null);
151151
};
152152

153153
handleShareScreen = () => {

src/Stores/CallStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import UserStore from './UserStore';
2121
import TdLibController from '../Controllers/TdLibController';
2222

2323
const JOIN_TRACKS = true;
24-
const UNIFY_SDP = true;
24+
const UNIFY_SDP = false;
2525
const UNIFY_CANDIDATE = true;
2626
const DATACHANNEL = true;
2727

0 commit comments

Comments
 (0)