-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't hear if somebody joins while you're on a different tab #6
Comments
If users don't have desktop notifications enabled, then perhaps we can still make a sound using the stream on an existing I don't think this is high priority to do, but it is an interesting workaround if we ever want to solve the problem better. |
That's an interesting thought. I do create a new Audio element for the notification and play it, so I think the restriction applies only to video. Maybe if you switch tabs we change everybody to audio tags. On the other hand I do like an indication that somebody joins rather than suddenly hearing their voice. |
People don't like desktop notifications, and often turn them off. I think we should investigate this audio tag concept. Actually, users shouldn't subscribe to video streams at all when their focus is in a different tab. |
We can actually play audio directly from the audiostream that comes in over webrtc, even before it hits the video tag. I've been writing code to do this, and we can even filter the audio: onremotestream: (stream) ->
# TODO: forget this key when they leave
save
key: 'stream/' + id,
url: URL.createObjectURL(stream)
volume: 0
# Get an audio node out of the incoming audio stream
window.audio or= new AudioContext()
s = audio.createMediaStreamSource(stream)
# Make a filter that sits in between the audio node and the sound card
filter = audio.createBiquadFilter()
filter.type = 'lowpass'
filter.frequency.value = 500
# Connect the incoming audio stream to the filter
s.connect(filter)
# Connect the filter to the sound card
filter.connect(audio.destination) I've been playing with this but right now it seems like it creates an echo. |
This is still happening, but harder to reproduce. If Travis starts in tawk by himself, then anybody else joins after some time, he can't hear them. However, if both of us start in tawk, he navigates to a different tab, and I refresh the page, he can hear me. Two theories (neither confirmed):
|
Browsers do not autoplay videos while you are in a different tab. This is mainly so that websites don't play ads in other tabs, you can open multiple youtube videos, etc.
For tawk, this means that if somebody joins your group, their
<video>
tag can't automatically play. You can't tell that they joined, and they can't get your attention.Tawk should send a user desktop notifications (similar to Slack) to inform them that a user joined. These notifications should only fire if you are not actively looking at tawk.
The text was updated successfully, but these errors were encountered: