Skip to content
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

[android] Room recording status #568

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

kubanac95
Copy link

This is a work in progress in hopes to close the following issue #566

Just adding onRecordingStarted and onRecordingStopped would have been sufficient in most cases, but, based on Twilio documentation for onRecordingStarted, it looks like it would not cover the case for joining a room that is already being recorded. (In cases of group rooms)

This method is only called when a Room which was not previously recording starts recording. If you've joined a Room which is already recording this event will not be fired.

One way to fix this would be to emit onRecordingStarted event manually on onConnected if room.isRecording() == true

I was also looking into adding isActive() method to the TwilioVideo component, but once I checked the current communication setup in the project, I noticed that there's no Promise based communication between the CustomTwilioVideoViewManager and the react-native code.

I looked into a possible solution inside react-native-camera module since I knew it had a promise-based API for communication with the CameraView, so I wrote the TwilioVideoModule to allow communication with the UI layer

This solution turned out to be working, but it the only the first time you start the video call. After starting the call for the second time I could not reach out to the CustomTwilioVideoView since the view was not properly destroyed previously and resources were not released it seems.

With a bit of help from sir @marqroldan and his PR, the view is properly destroyed

The whole purpose of this PR is not just to add the recording callbacks, but to actually establish a better solution for communicating with the UI layer.

I will flag this as a WIP since it still lacks iOS implementation, but any feedback is welcome on the abovementioned topics!

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant