plugin.googledrive icon indicating copy to clipboard operation
plugin.googledrive copied to clipboard

Playback stops abruptly

Open Navios92 opened this issue 4 years ago • 7 comments

I've been having this weird problem when playing my library strm files. If I pause the movie and leave it paused for a while, and then try to resume again, the playback stops abruptly after a couple of seconds. This also happens when I don't pause the movie at all but try to rewind after leaving it playing for several minutes without pausing.

Here is a log file. I played a movie for a couple of minutes - skipped back a little - left it playing for about 9 minutes and then paused - left it paused for a while and when I resumed, it played for a couple of seconds and then stopped.

Navios92 avatar Jan 03 '21 07:01 Navios92

Even though your log does not show any helpful information, I will try to reproduce it. I see a possible reason for the issue: the API change made last year. It will be only a confirmation anyway. If the api change is the reason, there will be no fast solution.

cguZZman avatar Jan 14 '21 19:01 cguZZman

Thanks for looking into it. Let me know if you need more logs.

Navios92 avatar Jan 19 '21 09:01 Navios92

I just made the test a moment ago, and confirmed the issue. At the end, it is because of the API change.

The stop happens because the credentials or token given by the google servers are only good for 1 hour, max. And as long as the addon has the control for navigation and play, a current credential is always available. The problem is that as soon as the playback starts, the addon has no way to update the credential. Kodi will be streaming the file and, after some time, if the credential has expired and you try to seek, this will cause the playback to stop since google will reject the request. This was solved before by creating a download service within the addon that first will refresh the credentials if needed and then redirect the request to google. But because of the API change, this redirect is not possible anymore.

For now, there is no other thing to do than play your file again. It will work because as soon as the playback stops, the addon will have the control and will update the credentials. So the file will play just fine.

I will leave this issue open, but there are no ETA for the fix as this will require a major change (building a proxy) and will require a lot of time.

cguZZman avatar Jan 20 '21 18:01 cguZZman

I'm experiencing this way back last year during -ber months. If my phone os is in android 10 or 11. Problem arises but if i put android 9 on my phone and use kodi, playback is normal Even on my mibox with kodi build which uses android 9 has a nice playback. Though on my windows 10 pc, problem is there

your0nlyfan avatar Feb 06 '21 15:02 your0nlyfan

to keep this thread clean, unrelated issues were deleted. @hmp22 if the issue is or looks different, open a new one.

cguZZman avatar Mar 12 '21 17:03 cguZZman

2months now since I have updated the 19.2/3 versions, the google drive videos keep stop playing. I tried to load the gdrive video from another file app and open from there with kodi player and it played fine. Must be something with the new kodi version or gdrive addon. PS. I have a Sony android smart tv

tonyleerep avatar Nov 01 '21 08:11 tonyleerep

I just ran into this issue. When pausing a video for some length of time... Resuming the video will play the remaining buffered stream and then stop playing.

One workaround is to increase the buffer size large enough to contain the entire file. This allows the download to complete regardless of pausing.

Is it possible for the plugin to trap the error that the stream has been interrupted, refresh the auth token, then resume the download/stream at the last resume point? I hope I'm not taking out of my a$$.

Cyber5imon avatar Feb 22 '22 10:02 Cyber5imon