Thanks for the responses! I was able to add the following to my ~/.elinks/elinks.conf
set document.uri_passing.open_vid = "mplayer %c 2>/dev/null" bind "main" "Ctrl-P" = "link-external-command" So when I highlight a link and press Ctrl+p, it opens in mplayer! However, for some reason mplayer isn't responsive to key commands while running. Does elinks gobble up the keystrokes while the external task is running (is it running in the background)? Is there a way to run the external program in the foreground? Daniel On Tue, Jul 7, 2015 at 1:34 PM, IngeGNUe <[email protected]> wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Hi, I do this: > > Go to options > Document > URI Passing. Add, then title it something > like stream-mplayer (do not use spaces). Edit the new entry you just > made. Type mplayer %c into the Value box, hit OK, Save, and you're done. > > I haven't tried this with mplayer. Personally, I prefer mpv. > > This way, you simply press a key (see your keybinding for "pass URI of > current link to external command") to select what to do with a > highlighted link, and it will either do the only action available or > show you a context menu of what to do with it. > > There are basically an unlimited variety of things you can do with URI > passing, including copying the link's URL, or launching any other > application. One of my personal favorites is opening a link in another > browser, e.g. IceCat, for those occasions that I need to run JavaScript > or the page's content won't display properly. When the command > completes, sometimes the window looks garbled, but Ctrl-L fixes that easily. > > > On 07/07/15 11:31, Daniel Roesler wrote: >> Howdy all, >> >> I'm trying to stream a video from a local website using elinks, but >> elinks is trying to download the entire video before opening it using >> mplayer. Is there a way I can pass the url of the link into the >> download command instead of the downloaded file? >> >> What I'm trying to open: >> <a href="vid.mp4">Vid</a> >> >> What I currently do: >> I highlight that link and hit Enter. The dialog pops up and asks if I >> want to open with "/usr/bin/mplayer %". I select Open. Then it starts >> downloading the full video file. I have to wait for the entire file to >> download before it opens in mplayer :( >> >> What I'd like to happen: >> When I hit Enter, I'd like to run "/usr/bin/mplayer %url%". That way, >> mplayer will just stream the video without waiting for the whole thing >> to download :) >> >> How do I do this in elinks? >> >> Thanks! >> Daniel > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQIcBAEBCAAGBQJVnDfJAAoJEN9nJ5jSz519RuAQAKmNBzbVy2c3BZmvcwWUG60/ > jwBA48ZCMPNMWZvVNtrECjPeqOIWQxEcBXraVHe/XPMVmkcg7sgDAGGttJKo6JKC > gseYn+A4l+thJqCIwAfhYEl6sSlytjDvZvbeHmXr8vzIyUX5eI67fxfNvdWqd5gv > jXC9isS0YG+MtJFe2as54ulplsa8sRa1wtkkm5wlwxyGBrtXPjbuz0ivIiNGni5K > OeDj5ErYeqHSLvEKuD52xLhUr3Xtas0cPvLU8nfuI9OhTebv81SqG8rVt735+0jU > A/qbHt887ArY1gYQcNJrUe0AWuvT8BJ6TY53G07xcC3+p5/aHq4ekg8Wjv6X3oju > 1faf17/h0Q+WohSA1LMR8PR4b2h+J5K58cwCzpUcga0gYTtO1TjNtZL4W8+0wPHR > W4h890hKqJGNsGMYMckPsIRAsXExrLOBSqpd9gn3RiyBSzWxsnou1bZwkpciA5Iq > YulHxn0Tut0EarGvj4X3nieAudfTjWJnKXDjS8y0rMROWgSrJnuWF0B23hv4qCWw > baqLD89NkvX/2xL30+xnIo/6a+dNAFp8SSbIStpEF9QPkNqzqYttnehNcGDpOAev > +cSkDa3e+qMYXCcyv/ENQ1lJwXO4moLoYh0+ZzafeM39nBxliIqmjHISvqxGf8Uq > SI3NMuTfyqZm9i8AhdNq > =SVD+ > -----END PGP SIGNATURE----- > > > -- > http://lists.linuxfromscratch.org/listinfo/elinks-users > Unsubscribe: See the above information page -- http://lists.linuxfromscratch.org/listinfo/elinks-users Unsubscribe: See the above information page
