[GH-ISSUE #536] Client notices when internet connection goes out and acts accordingly. #379

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

Originally created by @itsgreggreg on GitHub (Feb 8, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/536

Chrome, at tag v3.5.4

Right now when I'm offline and try to play a song or hit next Koel zooms through the rest of the playlist generating plays, updating the list of recently played song and loosing my place in the playlist.

Rather it should notice it's offline and act / display a message accordingly.


Side note, great work guys! I'm finding Koel extremely useful and lovely and would love to contribute if I can get up to speed.

Originally created by @itsgreggreg on GitHub (Feb 8, 2017). Original GitHub issue: https://github.com/koel/koel/issues/536 Chrome, at tag v3.5.4 Right now when I'm offline and try to play a song or hit next Koel zooms through the rest of the playlist generating plays, updating the list of recently played song and loosing my place in the playlist. Rather it should notice it's offline and act / display a message accordingly. ----- Side note, great work guys! I'm finding Koel extremely useful and lovely and would love to contribute if I can get up to speed.
kerem 2026-02-26 02:33:01 +03:00
Author
Owner

@X-Ryl669 commented on GitHub (Feb 9, 2017):

There's already a ping feature in the PHP backend, so it might not be very hard to do.
Please correct me if I'm wrong, but I think we should capture plyr's error and then try to ping the server and upon this error (not plyr's error alone since it sometimes fails for whatever reasons), put a "Disconnected" message on screen. Also need an interval to check the server presence regularly.

<!-- gh-comment-id:278607756 --> @X-Ryl669 commented on GitHub (Feb 9, 2017): There's already a ping feature in the PHP backend, so it might not be very hard to do. Please correct me if I'm wrong, but I think we should capture plyr's error and then try to ping the server and upon this error (not plyr's error alone since it sometimes fails for whatever reasons), put a "Disconnected" message on screen. Also need an interval to check the server presence regularly.
Author
Owner

@phanan commented on GitHub (Feb 10, 2017):

Or we can make use of navigator.onLine presented in green browsers. What to do after that is more important. Should we disable everything with an overlay, or somehow implement an offline queue for actions such as playlist-related, like/unlike etc.?

<!-- gh-comment-id:278843396 --> @phanan commented on GitHub (Feb 10, 2017): Or we can make use of `navigator.onLine` presented in green browsers. What to do _after that_ is more important. Should we disable everything with an overlay, or somehow implement an offline queue for actions such as playlist-related, like/unlike etc.?
Author
Owner

@phanan commented on GitHub (Feb 10, 2017):

Now that I think about it, Koel can totally run offline, i.e. if you use it locally or from a machine in your LAN. navigator.onLine will fail in these cases I suppose. The documentation describes quite different behaviors per browser as well.

<!-- gh-comment-id:278844383 --> @phanan commented on GitHub (Feb 10, 2017): Now that I think about it, Koel can totally run _offline_, i.e. if you use it locally or from a machine in your LAN. `navigator.onLine` will fail in these cases I suppose. The [documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine) describes quite different behaviors per browser as well.
Author
Owner

@X-Ryl669 commented on GitHub (Feb 10, 2017):

BTW, even when online, you could have reached the expiring time of the auth token and no other song fetching will work until you reconnect. Although can run offline, it's useless if you can't download songs, fetch artists and albums' info etc... None of those will fit in browser cache.
So a real offline mode seems like a dream for now.
I deduce that a user message "Koel is orphan from its server, please help..." and stopping playing is the first action to do.

<!-- gh-comment-id:278949110 --> @X-Ryl669 commented on GitHub (Feb 10, 2017): BTW, even when `online`, you could have reached the expiring time of the auth token and no other song fetching will work until you reconnect. Although can run *offline*, it's useless if you can't download songs, fetch artists and albums' info etc... None of those will fit in browser cache. So a real offline mode seems like a dream for now. I deduce that a user message "Koel is orphan from its server, please help..." and stopping playing is the first action to do.
Author
Owner

@phanan commented on GitHub (Dec 3, 2022):

This has landed (finally) in v6.5.2.

<!-- gh-comment-id:1336157598 --> @phanan commented on GitHub (Dec 3, 2022): This has landed (finally) in [v6.5.2](https://github.com/koel/koel/releases/tag/v6.5.2).
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#379
No description provided.