Skip to content

Commit d994186

Browse files
author
evgeny-nadymov
committed
Fix video ui for p2p calls
1 parent 8fab4f6 commit d994186

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

‎package.json

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

‎src/Components/Calls/CallPanel.css

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
position: absolute;
1818
left: 0;
1919
right: 0;
20+
z-index: 1;
2021
}
2122

2223
.call-panel-microphone-hint-wrapper {

‎src/Components/Calls/GroupCallPanel.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
#call-output-video {
99
width: 348px;
10-
max-height: 320px;
10+
height: 348px;
11+
background: black;
1112
}
1213

1314
.full-screen #call-output-video {
@@ -115,11 +116,11 @@
115116

116117
.group-call-panel-buttons {
117118
flex-shrink: 0;
118-
padding: 58px 40px;
119+
padding: 30px 40px 58px 40px;
119120
display: flex;
120121
flex-direction: row;
121122
justify-content: space-between;
122-
height: 220px;
123+
height: 192px;
123124
min-width: 348px;
124125
box-sizing: border-box;
125126
position: relative;

‎src/Stores/CallStore.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1971,6 +1971,11 @@ class CallStore extends EventEmitter {
19711971
}
19721972
}
19731973

1974+
// if (description.type === 'offer' && description.sdp.indexOf('a=setup:active')) {
1975+
// description.sdp = description.sdp.replaceAll('a=setup:active', 'a=setup:actpass')
1976+
// }
1977+
1978+
console.log('[sdp] remote', description.type, description.sdp)
19741979
await connection.setRemoteDescription(description);
19751980

19761981
if (currentCall.candidates) {
@@ -1982,7 +1987,10 @@ class CallStore extends EventEmitter {
19821987

19831988
if (!isAnswer) {
19841989
const answer = await connection.createAnswer();
1985-
console.log('[sdp] local', answer.sdp);
1990+
// if (description.sdp.indexOf('a=setup:active') && answer.sdp.indexOf('a=setup:active')) {
1991+
// answer.sdp = answer.sdp.replaceAll('a=setup:active', 'a=setup:passive');
1992+
// }
1993+
console.log('[sdp] local', answer.type, answer.sdp);
19861994
await connection.setLocalDescription(answer);
19871995

19881996
// LOG_P2P_CALL('2 try invoke p2pAppendInputStream', inputStream, is_outgoing);

0 commit comments

Comments
 (0)