* Feature Request: Support <audio> in shr
@ 2021-11-09 15:27 T.V Raman
2021-11-09 17:01 ` Eli Zaretskii
2021-11-09 23:48 ` Lars Ingebrigtsen
0 siblings, 2 replies; 9+ messages in thread
From: T.V Raman @ 2021-11-09 15:27 UTC (permalink / raw)
To: emacs-devel
Now that we have <video> support, could we also add <audio> support,
preferably where the player used to play the audio is customizable --
a function that takes the URL in the SRC attribute
with an appropriate default
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-09 15:27 Feature Request: Support <audio> in shr T.V Raman
@ 2021-11-09 17:01 ` Eli Zaretskii
2021-11-09 17:15 ` T.V Raman
2021-11-09 23:48 ` Lars Ingebrigtsen
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2021-11-09 17:01 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> From: "T.V Raman" <raman@google.com>
> Date: Tue, 9 Nov 2021 07:27:24 -0800
>
> Now that we have <video> support, could we also add <audio> support,
> preferably where the player used to play the audio is customizable --
> a function that takes the URL in the SRC attribute
> with an appropriate default
Maybe I don't understand what you are looking for, but Emacs already
has the play-sound-file command and the play-sound function.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-09 17:01 ` Eli Zaretskii
@ 2021-11-09 17:15 ` T.V Raman
2021-11-09 18:29 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2021-11-09 17:15 UTC (permalink / raw)
To: eliz; +Cc: raman, emacs-devel
play-sound-file does not know to play things like mp3s.
Specifically, what I was asking Lars was that we :
1. Support the HTML <audio> tag alongside the video tag
2. That we implement pressing <RET> on the rendering of a <audio>
tag to invoke a function that receives the src attribute of
<audio>
Eli Zaretskii writes:
> > From: "T.V Raman" <raman@google.com>
> > Date: Tue, 9 Nov 2021 07:27:24 -0800
> >
> > Now that we have <video> support, could we also add <audio> support,
> > preferably where the player used to play the audio is customizable --
> > a function that takes the URL in the SRC attribute
> > with an appropriate default
>
> Maybe I don't understand what you are looking for, but Emacs already
> has the play-sound-file command and the play-sound function.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-09 17:15 ` T.V Raman
@ 2021-11-09 18:29 ` Eli Zaretskii
0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-11-09 18:29 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> From: "T.V Raman" <raman@google.com>
> Date: Tue, 9 Nov 2021 09:15:41 -0800
> Cc: raman@google.com,
> emacs-devel@gnu.org
>
> play-sound-file does not know to play things like mp3s.
Then maybe we should extend it so it does. (It does for me on
MS-Windows, FWIW. I'm playing Leonard Cohen's "I'm Your Man" in MP3
as I'm writing this.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-09 15:27 Feature Request: Support <audio> in shr T.V Raman
2021-11-09 17:01 ` Eli Zaretskii
@ 2021-11-09 23:48 ` Lars Ingebrigtsen
2021-11-10 2:27 ` T.V Raman
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-09 23:48 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
"T.V Raman" <raman@google.com> writes:
> Now that we have <video> support, could we also add <audio> support,
> preferably where the player used to play the audio is customizable --
> a function that takes the URL in the SRC attribute
> with an appropriate default
I think we already have that? That is, `browse-url-handlers' can react
to URLs (like .mp3) and use whatever you want to use to handle it...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-09 23:48 ` Lars Ingebrigtsen
@ 2021-11-10 2:27 ` T.V Raman
2021-11-10 2:32 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2021-11-10 2:27 UTC (permalink / raw)
To: larsi; +Cc: raman, emacs-devel
But right now <audio src=...>my talk</audio> produces a "unsupported
content type" link in EWW.
Lars Ingebrigtsen writes:
> "T.V Raman" <raman@google.com> writes:
>
> > Now that we have <video> support, could we also add <audio> support,
> > preferably where the player used to play the audio is customizable --
> > a function that takes the URL in the SRC attribute
> > with an appropriate default
>
> I think we already have that? That is, `browse-url-handlers' can react
> to URLs (like .mp3) and use whatever you want to use to handle it...
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-10 2:27 ` T.V Raman
@ 2021-11-10 2:32 ` Lars Ingebrigtsen
2021-11-10 23:10 ` T.V Raman
0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-10 2:32 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
"T.V Raman" <raman@google.com> writes:
> But right now <audio src=...>my talk</audio> produces a "unsupported
> content type" link in EWW.
Yes, you'll have to configure browse-url-handlers for that to work, I
think.
The default will eventually to use webkit (like shr does with video),
but we haven't gotten that far yet.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-10 2:32 ` Lars Ingebrigtsen
@ 2021-11-10 23:10 ` T.V Raman
2021-11-11 3:20 ` Lars Ingebrigtsen
0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2021-11-10 23:10 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1302 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
After looking into this a bit further:
1. browse-url-handlers matches on URL pattern, should we also be able to
match on content-type?
2. I tried to regex match on .mp3$, but it turns out that
A) did not work after setting
(("\\`*.mp3\\$" . emacspeak-m-player-url) ("\\`mailto:"
. browse-url--mailto) ("\\`man:" . browse-url--man)
(browse-url--non-html-file-url-p . browse-url-emacs))
Opening a simple html file in EWW/shr containing
<p>And here is an <audio
src="http://emacspeak.sourceforge.net/raman/publications/limaye-raman.mp3">Audio
talk</audio></p>
1. Appears to wait till the mp3 is completely downloaded,
B. Continues to display the "Content Type Not supported"
message.
> "T.V Raman" <raman@google.com> writes:
>
>> But right now <audio src=...>my talk</audio> produces a "unsupported
>> content type" link in EWW.
>
> Yes, you'll have to configure browse-url-handlers for that to work, I
> think.
>
> The default will eventually to use webkit (like shr does with video),
> but we haven't gotten that far yet.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1 0Ü8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Feature Request: Support <audio> in shr
2021-11-10 23:10 ` T.V Raman
@ 2021-11-11 3:20 ` Lars Ingebrigtsen
0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-11 3:20 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
"T.V Raman" <raman@google.com> writes:
> 1. browse-url-handlers matches on URL pattern, should we also be able to
> match on content-type?
We usually don't have a content type to match on here -- just an URL, I
think?
> 2. I tried to regex match on .mp3$, but it turns out that
> A) did not work after setting
> (("\\`*.mp3\\$" . emacspeak-m-player-url) ("\\`mailto:"
Didn't work how?
> 1. Appears to wait till the mp3 is completely downloaded,
> B. Continues to display the "Content Type Not supported"
> message.
The function that handles the URL is responsible for displaying it.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-11-11 3:20 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09 15:27 Feature Request: Support <audio> in shr T.V Raman
2021-11-09 17:01 ` Eli Zaretskii
2021-11-09 17:15 ` T.V Raman
2021-11-09 18:29 ` Eli Zaretskii
2021-11-09 23:48 ` Lars Ingebrigtsen
2021-11-10 2:27 ` T.V Raman
2021-11-10 2:32 ` Lars Ingebrigtsen
2021-11-10 23:10 ` T.V Raman
2021-11-11 3:20 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).