youtube / youtube-ios-player-helper

Lightweight helper library that allows iOS developers to add inline playback of YouTube videos through a WebView
Other
1.65k stars 684 forks source link

onStateChange send "playing" state right after "pausing" state when the video is buffering #457

Open ghost opened 2 years ago

ghost commented 2 years ago

When I'm in bad network condition, the video is pausing to buffer, and onStateChange trigger "playing" right after "paused" but the video is still not playing.

jasonszheng commented 2 years ago

Hello @tristancombette I simulated a bad network connection of 56 kbps and was unable to reproduce this. Are you able to reproduce this with our demo application? We have a status log in our demo application that is able to log the state of the player for easy debugging.

ghost commented 2 years ago

Hello, yes I am able to reproduce with the demo application. Here is the log :

Player state changed: 4 (First buffering of the video when i press play button) Player state changed: 2 (This one is triggered when the video start playing) Player state changed: 4 (the video is buffering (lag) because of bad network Player state changed: 2 (this playing state is triggered almost at the same time as the previous one) but the video is not playing)

When i go back to normal network condition the video resume but, i receive no changed state.