Closed karth295 closed 8 years ago
I think I figured out the issue. Changing the volume of video/audio tags using React doesn't work.
Code that should work, but doesn't:
<script type= 'statebus'> # -*- mode: coffee -*-
dom.BODY = ->
DIV {},
INPUT
type: 'range'
onChange: (e) ->
volume = fetch('volume')
volume.volume = e.target.value / 100.0
save(volume)
HOLA {}
dom.HOLA = ->
volume = fetch('volume')
AUDIO
src: '/iron-man-01.mp3'
autoPlay: true
controls: true
volume: volume.volume || 0.5
</script>
<script>
statebus_server = window.location.protocol + '//' + window.location.hostname + ':3004'
statebus_version = 3
</script>
<script src="https://stateb.us/client.js" ></script>
Code that does work:
<script type= 'statebus'> # -*- mode: coffee -*-
dom.BODY = ->
DIV {},
INPUT
type: 'range'
onChange: (e) ->
volume = fetch('volume')
volume.volume = e.target.value / 100.0
save(volume)
HOLA {}
dom.HOLA = ->
volume = fetch('volume')
AUDIO
src: '/iron-man-01.mp3'
autoPlay: true
controls: true
volume: volume.volume || 0.5
dom.HOLA.refresh = ->
volume = fetch('volume')
console.log('HOLA.refresh', volume)
@getDOMNode().volume = volume.volume || 0.5
</script>
<script>
statebus_server = window.location.protocol + '//' + window.location.hostname + ':3004'
statebus_version = 3
</script>
<script src="https://stateb.us/client.js" ></script>
If this theory is correct, the repro should be:
-Person A enters tawk.space and creates a group -Person B enters and creates a different group (meaning A/B can't hear each other) -Person B should join Person A's group. If they can't hear each other, we've reproduced the bug.
Cool man. I think this theory fits with the situation where I saw it occur. It would happen when the group changes somehow, often because of a dropped connection. I could imagine that the new group gets diffed with the old group, and ... somehow something might be initialized to null or something.
We don't know why, but sometimes some participants can hear one person, while others can't. That person's microphone does work, and tawk sets the person's volume to the correct number (20, 80, or 100%). Here are debugging tips:
I'm inclined to think it's #3. If that's the case, we could leave everybody's volume at 100% (across all groups) and see if that fixes it.