This message was deleted.
# helpdesk
s
This message was deleted.
p
hi Karen, for the
startAudio
method to work it needs to be triggered directly from a user gesture (e.g. in the click handler of a button). Otherwise the browser won’t allow audio playback
a
@polite-kilobyte-67570 thanks for reply. I have added button to trigger
startAudio
but it doesn't help me.
canPlayAudio
was true before click and after
@polite-kilobyte-67570 could you help me please?
p
In order to debug this and figure out if this is LiveKit related, we’d need a minimal reproduction repository based on one of the components examples. If you can provide that, I can take a look
a
@polite-kilobyte-67570 https://github.com/Karen-1992/livekit-videoconference I created project to show my problem. You should set keys and host for livekit api. In Room component if I comment LiveKitRoom my alert play, but I should click once anywhere. But with LiveKitRoom it doesn't work. StartAudio button hidden in ControlBar component
I have this problem in Google Chrome. Maybe for other it relevant too
p
thanks for the reproduction. I am able to reproduce this issue only when using bluetooth headphones 🤯 if I switch to my macbook speakers, it goes away. Do you happen to be testing with headphones, too?
a
No, I didn't use headphones
@polite-kilobyte-67570 Sometimes after page refreshing it starts playing but after 1-2 seconds it interrupted by something. But it happens rarely. Usually audio doesn't plays
p
can you try removing the
RoomAudioRenderer
? there’s already a room audio renderer inside of the
VideoConference
a
@polite-kilobyte-67570 I have already tried - no result
p
strange, it works for me with that change and without the bluetooth device.
a
@polite-kilobyte-67570 I have tried again but nothing changed. I use windows system. Can it be issue only for windows?
p
might be. I also noticed that it worked (even without my changes) when the local participant never published a mic track, so
audio=false
on the LiveKitRoom. Does that at least work for you?
a
Yes. I tried with
audio=false
and it works. But I can't turn off audio, participants can speak when alert is playing
@polite-kilobyte-67570 I use livekit Web Egress for recording and egress records this alert with any problems
I set for egress
audio=false
, now I understand why it works
p
a workaround you can try is to set
expWebAudioMix: { audioContext: myAudioContext }
and play the alert via webAudio. That way the same audio context will be used for both the livekit room and your alert playback. I haven’t tried this approach yet to verify it works, but it seems like a good option to try
a
@polite-kilobyte-67570 thanks. I'll try it and give you feedback later
@polite-kilobyte-67570 thanks for help, it works, but for iphone + safari not