8000 Improve feedback when attempting to play from unreachable URL · Issue #29 · kljohann/mpv.el · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve feedback when attempting to play from unreachable URL #29

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

Open
kljohann opened this issue Aug 1, 2022 · 0 comments
Open

Improve feedback when attempting to play from unreachable URL #29

kljohann opened this issue Aug 1, 2022 · 0 comments

Comments

@kljohann
Copy link
Owner
kljohann commented Aug 1, 2022

Is the reason for mpv--url-reachable-p that you want to give friendly feedback to the user if playback fails (instead of just silently doing nothing)?

Yes, it seemed like a simple enough check to synchronously make the user aware of invalid/unreachable URLs, and fail fast in case there is no network connection available as well.
The immediate downside I can see with it, is that the code does a full GET request for the given URL, so it does load the full response body into a temporary buffer, without added protection/security, in case that would be a concern.
(A HEAD request would safeguard this a bit more, but I couldn't find an easy way to do this in Emacs without adding libraries or lots of extra code on top 😄)

With the hook approach, don't we lose the semantics of what exactly caused the failure, e.g. malformed, unreachable, invalid file format, ...? I assume mpv will simply treat is as a file-loading exception (which, within its context, is completely reasonable), but I could be wrong.
I'll look further into the man pages for mpv, as I don't have much knowledge of it beyond simple usage

Originally posted by @detvdl in #14 (comment)

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

No branches or pull requests

1 participant
0