opentok / opentok-react-native

OpenTok React Native - a library for OpenTok iOS and Android SDKs
https://tokbox.com/
MIT License
210 stars 155 forks source link

added condition to stop and init capture #677

Open cnx-caiobarroso opened 1 year ago

cnx-caiobarroso commented 1 year ago

Description

This PR prevents the startCapture and stopCapture functions from being called whenever the state isn't the opposite.

Contributing checklist

Solves issue(s)

https://github.com/opentok/opentok-react-native/issues/676

cnx-caiobarroso commented 1 year ago

@jeffswartz, done!

Panda-ref commented 1 year ago

The original issue clearly claims com.opentok.android.Camera2VideoCapturer.stopCapture crashing.

How does changing com.opentokreactnative.OTScreenCapturer.stopCapture/startCapture fix it?

It seems unrelated imo

cnx-caiobarroso commented 10 months ago

@Panda-ref Hmm, I guess you are right, but I can't find this "Camera2VideoCapturer" file. Maybe it's related to the Gradle project, or as it uses the Android SDK under the covers it crashes there because of this error.

pietgk commented 9 months ago

Event with it potentially being unrelated, its still an improvement AFAIKT. So we could merge and finish this PR