[GH-ISSUE #550] Prefetching doesn't work :( #392

Closed
opened 2026-02-26 02:33:04 +03:00 by kerem · 12 comments
Owner

Originally created by @o355 on GitHub (Mar 6, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/550

Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:

  • [yup] You have read and followed closely the Wiki, Upgrade Guide, as well as Troubleshooting
  • [mhm] The issue has not been reported before
  • [i run linux] This is not a "how to install on Windows" or "why is my npm messed up" question
  • [you bet] You're a cool person

All checked? Now also make sure your issue

  • [sure thing] Is associated with a version. Or better yet, a commit. - 3.5.5 (git checkout)
  • [you bet] Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?)
  • Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know)
  • [muy bien.] Is in English, 因为我不说中文。

So, prefetching doesn't work. I've been listening to an EP, and on my stellar 200 Mbps local Wi-Fi, Koel isn't prefetching the song, and playing the next song. Since my Wi-Fi is fast, music will not play for a second (500-1000ms), but I could imagine this being worse on a mobile network (Verizon)

OS on the server is Ubuntu Server 16.04.2 LTS. On the client side, Kubuntu 16.10, using Chrome 56.

Originally created by @o355 on GitHub (Mar 6, 2017). Original GitHub issue: https://github.com/koel/koel/issues/550 Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue: - [yup] You have read and followed closely the [Wiki](https://github.com/phanan/koel/wiki), [Upgrade Guide](https://github.com/phanan/koel/releases), as well as [Troubleshooting](https://github.com/phanan/koel/wiki/Troubleshooting) - [mhm] The issue has not been reported before - [i run linux] This is not a "how to install on Windows" or "why is my npm messed up" question - [you bet] You're a cool person All checked? Now also make sure your issue - [sure thing] Is associated with a version. Or better yet, a commit. - 3.5.5 (git checkout) - [you bet] Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?) - [x] Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know) - [muy bien.] Is in English, 因为我不说中文。 So, prefetching doesn't work. I've been listening to an EP, and on my stellar 200 Mbps local Wi-Fi, Koel isn't prefetching the song, and playing the next song. Since my Wi-Fi is fast, music will not play for a second (500-1000ms), but I could imagine this being worse on a mobile network (Verizon) OS on the server is Ubuntu Server 16.04.2 LTS. On the client side, Kubuntu 16.10, using Chrome 56.
kerem 2026-02-26 02:33:04 +03:00
Author
Owner

@o355 commented on GitHub (Mar 6, 2017):

Bit of an update, either time is flying by too quickly, or the prefetch delay is almost gone. Not sure which of the two it is, but...
I'll listen more closely.

EDIT: Nope, still broken :(

<!-- gh-comment-id:284304592 --> @o355 commented on GitHub (Mar 6, 2017): Bit of an update, either time is flying by too quickly, or the prefetch delay is almost gone. Not sure which of the two it is, but... I'll listen more closely. EDIT: Nope, still broken :(
Author
Owner

@phanan commented on GitHub (Mar 6, 2017):

Weird. It's working perfectly for me, Chrome 56, Mac.

image

<!-- gh-comment-id:284324184 --> @phanan commented on GitHub (Mar 6, 2017): Weird. It's working perfectly for me, Chrome 56, Mac. ![image](https://cloud.githubusercontent.com/assets/8056274/23600874/4645b2b0-027b-11e7-83be-c441c4daebd4.png)
Author
Owner

@o355 commented on GitHub (Mar 6, 2017):

Huh. I'll certainly pull up the network tab, and see what's going on.

I don't know if having another tab open causes an issue, but I'll try it in the foreground/background in Chrome.

<!-- gh-comment-id:284427612 --> @o355 commented on GitHub (Mar 6, 2017): Huh. I'll certainly pull up the network tab, and see what's going on. I don't know if having another tab open causes an issue, but I'll try it in the foreground/background in Chrome.
Author
Owner

@o355 commented on GitHub (Mar 7, 2017):

spectacle j10880

So, as seen here, it appears as if Koel is prefetching the next song, but when the next song begins to play, Koel fetches the file again (for some reason), but there's still a delay between songs. I'm going to try and throttle Chrome, and truly see if prefetching is enabled.

<!-- gh-comment-id:284607395 --> @o355 commented on GitHub (Mar 7, 2017): ![spectacle j10880](https://cloud.githubusercontent.com/assets/10540073/23639935/5bf9e38c-02b8-11e7-99a1-da9ca9ddb5b9.png) So, as seen here, it appears as if Koel is prefetching the next song, but when the next song begins to play, Koel fetches the file again (for some reason), but there's still a delay between songs. I'm going to try and throttle Chrome, and truly see if prefetching is enabled.
Author
Owner

@o355 commented on GitHub (Mar 7, 2017):

Here's what I'm generally noticing. Koel indeed prefetches the song that's upcoming next, but after a song has ended, and it moves on to the next song, Koel again fetches the song, which is really odd. Anywhom, it's happened 100% of the time, when throttling Chrome down to "Good 4G".

<!-- gh-comment-id:284609148 --> @o355 commented on GitHub (Mar 7, 2017): Here's what I'm generally noticing. Koel indeed prefetches the song that's upcoming next, but after a song has ended, and it moves on to the next song, Koel again fetches the song, which is really odd. Anywhom, it's happened 100% of the time, when throttling Chrome down to "Good 4G".
Author
Owner

@phanan commented on GitHub (Mar 7, 2017):

Hmm. I'll take a look at this. Maybe there's a change in the API, or maybe the implementation is wrong from the beginning (which is unlikely). Thanks for the very detailed issue report!

<!-- gh-comment-id:284609408 --> @phanan commented on GitHub (Mar 7, 2017): Hmm. I'll take a look at this. Maybe there's a change in the API, or maybe the implementation is wrong from the beginning (which is unlikely). Thanks for the very detailed issue report!
Author
Owner

@o355 commented on GitHub (Mar 7, 2017):

No problem! Always happy to help. Also, I'm seeing some ERR_CONTENT_LENGTH_MISMATCH errors coming up in Chrome's network waterfall, when Koel is running in the background, so that's interesting.

<!-- gh-comment-id:284609670 --> @o355 commented on GitHub (Mar 7, 2017): No problem! Always happy to help. Also, I'm seeing some ERR_CONTENT_LENGTH_MISMATCH errors coming up in Chrome's network waterfall, when Koel is running in the background, so that's interesting.
Author
Owner

@phanan commented on GitHub (Mar 7, 2017):

Yeah, that's very normal.

<!-- gh-comment-id:284609881 --> @phanan commented on GitHub (Mar 7, 2017): Yeah, that's very normal.
Author
Owner

@Andy-H-Nguyen commented on GitHub (Mar 16, 2017):

Yes, it seems to be fetching twice for me, and there is delay between songs. I am running on the client on Chrome 56 on Windows 8, the server is running on ubuntu 14.04.

<!-- gh-comment-id:287188177 --> @Andy-H-Nguyen commented on GitHub (Mar 16, 2017): Yes, it seems to be fetching twice for me, and there is delay between songs. I am running on the client on Chrome 56 on Windows 8, the server is running on ubuntu 14.04.
Author
Owner

@phanan commented on GitHub (Mar 22, 2017):

What streaming method are you guys using? x-sendfile and x-accel-redirect work for me. For php (default) looks like we need a way to cache the content streamed by PHP, which I don't know how to do.

<!-- gh-comment-id:288321542 --> @phanan commented on GitHub (Mar 22, 2017): What streaming method are you guys using? `x-sendfile` and `x-accel-redirect` work for me. For `php` (default) looks like we need a way to cache the content streamed by PHP, which I don't know how to do.
Author
Owner

@Andy-H-Nguyen commented on GitHub (Mar 22, 2017):

Yes, I am running using php. Haven't gotten the chance to try x-sendfile and x-accel-redirect yet.

<!-- gh-comment-id:288515784 --> @Andy-H-Nguyen commented on GitHub (Mar 22, 2017): Yes, I am running using php. Haven't gotten the chance to try `x-sendfile` and `x-accel-redirect` yet.
Author
Owner

@o355 commented on GitHub (Mar 22, 2017):

I'm using what's set by default with Koel (so I assume php).

<!-- gh-comment-id:288535011 --> @o355 commented on GitHub (Mar 22, 2017): I'm using what's set by default with Koel (so I assume `php`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#392
No description provided.