Skip to content

Commit

Permalink
loop incoming/outgoing callsound
Browse files Browse the repository at this point in the history
  • Loading branch information
Flemmli97 committed Oct 30, 2024
1 parent ed67065 commit fab47b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/calling/CallScreen.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
/// HACK: To make sure the video elements are loaded before we start the call
if (VoiceRTCInstance.localVideoCurrentSrc && VoiceRTCInstance.remoteVideoCreator) {
if (VoiceRTCInstance.toCall && VoiceRTCInstance.toCall.find(did => did !== "") !== undefined && $callInProgress === null) {
callSound = await playSound(Sounds.OutgoingCall)
callSound = await playSound(Sounds.OutgoingCall, { loop: true })
await VoiceRTCInstance.makeCall()
timeout = setTimeout(() => {
callSound?.stop()
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/calling/IncomingCall.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Store.state.pendingCall.subscribe(async _ => {
if (VoiceRTCInstance.incomingCallFrom && !VoiceRTCInstance.toCall && $connectionOpened) {
if (callSound === null || callSound === undefined) {
callSound = await playSound(Sounds.IncomingCall)
callSound = await playSound(Sounds.IncomingCall, { loop: true })
}
pending = true
let chat = UIStore.getChat(VoiceRTCInstance.incomingCallFrom[1].metadata.channel)
Expand Down

0 comments on commit fab47b2

Please sign in to comment.