Closed ssimonitch closed 1 year ago
@Regaddi It seems like the problem is that recording state is purely a local thing -- is there any sort of server-side recording status we can hook into? Or maybe monitor participants
updates and change recording state to false
when the recording participant is no longer in the list?
Thanks @ssimonitch for the bug report, and @67ideas for your input!
In fact the issue is already being tracked internally and we have a PR open to fix it.
The issue here is that useRecording
doesn't maintain its state from a central component. Instead we rely on at least 1 instance of useRecording
to be present, in order to handle all necessary events emitted by daily-js.
I'll try my best to get this wrapped up this week. useRecording
is not the only hook being affected by this type of issue: the same issue applies to useLiveStreaming
as well.
Expected behavior
I'm experiencing an issue similar to what I saw here: https://github.com/daily-co/daily-react/issues/9
This time the issue is with the
isRecording
value returned by theuseRecording
hook. I expect theisRecording
value to accurately reflect whether or not there is a recording in progress for the current room.Describe the bug (unexpected behavior)
When a user joins a room and starts a recording, the
isRecording
value istrue
. If that user then stops the recording and leaves the room, theisRecording
value remainstrue
. If the user rejoins the room, theisRecording
value is stilltrue
even though there is no recording in progress.During the above process, if there is another user in the room the
isRecording
value changes fromtrue
tofalse
as expected.Steps to reproduce
I have a modified version of our last code sandbox here: https://codesandbox.io/s/angry-driscoll-h0ouu6?file=/src/SessionIDDisplay.js
To reproduce:
true
for both userstrue
in window A andfalse
in window Btrue
in window A andfalse
in window B