Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening some types of URLs cause permanent buffering #5224

Closed
4 tasks done
Timsonrobl opened this issue Dec 19, 2020 · 5 comments · Fixed by #5317
Closed
4 tasks done

Opening some types of URLs cause permanent buffering #5224

Timsonrobl opened this issue Dec 19, 2020 · 5 comments · Fixed by #5317
Labels
bug Issue is related to a bug

Comments

@Timsonrobl
Copy link

Timsonrobl commented Dec 19, 2020

Checklist

Steps to reproduce the bug

  1. Go to youtu.be link for a video inside playlist with a time code. Example 'https://youtu.be/ut3n8-9JM5o?list=PLbQ-gSLYQEc4mnWapHJd0K-sPvLcEwOSS&t=274'
    Such URLs are provided when you click RMB in web YouTube player and choose "Copy video URL at current time"

Actual behaviour

Infinite buffering on black screen.

Expected behavior

Opening video on specified time.

Device info

  • Android version/Custom ROM version: 8.0
  • Device model: Samsung Galaxy S7
@Timsonrobl Timsonrobl added the bug Issue is related to a bug label Dec 19, 2020
@tiwarys
Copy link

tiwarys commented Dec 19, 2020

I'm also facing this issue.

@XiangRongLin
Copy link
Collaborator

This issue is not limited to videos inside playlists. I think any video with an timestamp will cause this issue
ex.: https://www.youtube.com/watch?v=nSNQ_Qh9Pss&t=203

@Stypox @TobiGr
This is an regression from 19.8 to 20.8, because in pre unified version the link in the top comment and mine above work.

The reason for the endless buffering is that the playQueue is null and BasePlayer.onPlay() just silently returns without doing anything

public void onPlay() {
if (DEBUG) {
Log.d(TAG, "onPlay() called");
}
if (audioReactor == null || playQueue == null || simpleExoPlayer == null) {
return;
}

Reason for playQueue being null is that item.getRecoveryPosition() returns the timestamp, which is not equal PlayQueueItem.RECOVERY_UNSET. This causes initPlayback to never be called, which would set the playQueue. I assume previously videos with timestamps were not handled here, but somewhere else.

if (item != null && item.getRecoveryPosition() == PlayQueueItem.RECOVERY_UNSET) {

@XiangRongLin
Copy link
Collaborator

XiangRongLin commented Dec 30, 2020

@Timsonrobl @shivasagarrao
I opened a PR linked above to adress this, can you test it out

@XiangRongLin
Copy link
Collaborator

#5301
this could be related. because it's the same problem of playQueue being null

@tiwarys
Copy link

tiwarys commented Dec 31, 2020

@XiangRongLin I tested the apk and links with start time are loading perfectly now. Thanks for PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants