Fix gc sound

This commit is contained in:
morethanwords 2021-12-12 03:25:53 +04:00
parent eefc479a0e
commit b2f5c08934
2 changed files with 14 additions and 5 deletions

4
.env
View File

@ -1,5 +1,5 @@
API_ID=1025907
API_HASH=452b0359b988148995f22ff0f4229750
VERSION=1.0.0
VERSION_FULL=1.0.0 (38)
BUILD=38
VERSION_FULL=1.0.0 (40)
BUILD=40

View File

@ -308,6 +308,9 @@ export class GroupCallInstance {
// possible Safari fix
const audio = new Audio();
audio.play().catch(noop);
audio.autoplay = true;
audio.volume = 1.0;
this.player.append(audio);
this.elements.set('audio', audio);
}
@ -638,9 +641,15 @@ export class GroupCallInstance {
// audio.play();
elements.set(elementEndpoint, element);
}/* else {
element.srcObject = useStream;
} */
} else {
if(element.paused) {
element.play().catch(noop);
}
if(element.srcObject !== useStream) {
element.srcObject = useStream;
}
}
if(isOutput) {
const entry = description.getEntryBySource(+source);