opentok / opentok-android-sdk-samples

Sample applications illustrating best practices using OpenTok Android SDK.
https://tokbox.com/developer/sdks/android/
MIT License
211 stars 169 forks source link

PublisherKit.setVideoStatsListener(VideoStatsListener listener) Listener is first trigger after 1min from session onConnected() #404

Closed mayurpatil307 closed 1 year ago

mayurpatil307 commented 2 years ago

Hi,

The VideoStatsListener is triggered approx. 1min after the sission onConnected() is triggered. After session is connected the stream gets published but for 1min we don't receive any callback from VideoStatsListener.

Is this a bug or is it expected interval of 1min to receive first callback trigger of VideoStatsListener?

IGitGotIt commented 1 year ago

The measurement is being done incorrectly. VideoStatsListener belongs to a publisher/subscriber and not a session. The easy way to measure is from the moment the listener is set on the publisher/subscriber when its stream is ready (onStreamReceived or onStreamCreated) , to the stats callback. This is typically in the range of 2-4 seconds.

v-kpheng commented 1 year ago

Thanks, @IGitGotIt , for helping out.

@mayurpatil307, I'm closing this, since this doesn't appear to be a bug with the SDK.