Device (please compete the following information):
sessionId, if applicable: N/A
Android SDK version: 34
OS and version: Emulator API 34 or Samsung S23 Ultra
com.opentok.android:opentok-android-sdk:2.27.1
Additional contextcycleCamera should either be synchronous, or a Future, so that the API users know when the process of switching camera is finished and is ready to be switched again. Note that Publisher.CameraListener.onCameraChanged is firing before cycleCamera is complete. It cannot be used as a reliable source of information about when cycleCamera is ready to be called again.
Describe the bug Stream freezes when
cycleCamera
is called without delay multiple timesTo Reproduce Steps to reproduce the behavior:
cycleCamera
twice in a rowMinimal reproducible example:
Expected behavior Camera cycles multiple times
Screenshots Video attached: CycleCamera.webm
Device (please compete the following information):
com.opentok.android:opentok-android-sdk:2.27.1
Additional context
cycleCamera
should either be synchronous, or a Future, so that the API users know when the process of switching camera is finished and is ready to be switched again. Note thatPublisher.CameraListener.onCameraChanged
is firing beforecycleCamera
is complete. It cannot be used as a reliable source of information about whencycleCamera
is ready to be called again.