opentok/opentok-react-native

Android Video stream stops

AndreasKarlzzon opened this issue · 3 comments

Bug Report

This is only happening on Android

Current behavior

(Summarize the bug encountered concisely)

Taking the app from active to the background and then from background to active makes the video stream go black

Steps to reproduce

(How one can reproduce the issue - this is very important)

Taking the app from active to the background and then from background to active

Example Project

(If possible, please create an example project here on GitHub.com that exhibits the problematic behavior, and link to it here in the bug report)

What is the current bug behavior?

(What actually happens)

The stream becomes black

What is the expected correct behavior?

(What you should see instead)

The streams pause when it goes in the background and resumes when it goes the app goes to the foreground

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

I think this is related to #628 - I had the exact same issue on version 0.21.1 (pulling in com.opentok.android:opentok-android-sdk 2.23.1), while both issues went away after downgrading to 0.20.4 (pulling in com.opentok.android:opentok-android-sdk 2.21.5).

For me the issues were:

  • React re-renders of a screen containing the Opentok component cause the video output to freeze and the view to freeze on the latest frame
  • Unfocusing and refocusing a screen (by screen on/off, navigation, etc) containing the Opentok component causes the video output to freeze and the view to show solid black

Both have a lot of output like this in Android Studio logcat:

2023-02-08 01:36:43.179 22250-22293 BufferQueueProducer     com.my.app               E  [SurfaceTexture-42-22250-0](id:56ea00000004,api:4,p:711,c:22250) queueBuffer: BufferQueue has been abandoned