Does anyone have any toughts on how one should be using <video> & <audio> with Markdown? Using the link or the img syntax? Maybe: [a film](film.m4v) [an audio](audio.mp3) could create: <video src="film.m4v" controls><a href="film.m4v">a film</a></ video> <audio src="audio.mp4" controls><a href="audio.m4v">an audio</a></ audio> Other suggestions?
On Tue, Mar 18, 2008 at 10:59 AM, Aslak Raanes <aslakr at gmail.com> wrote:> Does anyone have any toughts on how one should be using <video> & > <audio> with Markdown? Using the link or the img syntax? > > Maybe: > > [a film](film.m4v) > [an audio](audio.mp3) > > could create: > > <video src="film.m4v" controls><a href="film.m4v">a film</a></ > video> > <audio src="audio.mp4" controls><a href="audio.m4v">an audio</a></ > audio>I think you would need the same approach Markdown takes with images today - a unique syntax structure. Overloading one syntax structure (<object>) to support multiple complex mime-types is very tricky and it is one of the main reasons why HTML 5 has new elements for audio & video. (Of course this is also one of the most argued over parts of the HTML 5 spec but I've yet to see any proposal for fixing the gigantic mess that <object> has left us with.) -s
On Tue, Mar 18, 2008 at 1:59 PM, Aslak Raanes <aslakr at gmail.com> wrote:> Does anyone have any toughts on how one should be using <video> & > <audio> with Markdown? Using the link or the img syntax? > > Other suggestions? >This would fall under raw html. You should simple write your own html directly in the markdown document just the way you want it. The parser will pass it though unchanged. If you question this answer, go re-read the [Inline HTML][] section of the syntax rules. The way I read it, this is the only appropriate solution. [InlineHTML]: http://daringfireball.net/projects/markdown/syntax#html -- ---- Waylan Limberg waylan at gmail.com
In article <494EF9DF-15FE-42C0-8644-46D072EDB3C1 at gmail.com>, Aslak Raanes <markdown-discuss at six.pairlist.net> wrote:>Does anyone have any toughts on how one should be using <video> & ><audio> with Markdown? Using the link or the img syntax? > >Maybe: > > [a film](film.m4v) > [an audio](audio.mp3) > >could create: > > <video src="film.m4v" controls><a href="film.m4v">a film</a></ >video> > <audio src="audio.mp4" controls><a href="audio.m4v">an audio</a></ >audio>If I was going to do a [][] link extension for <video> and <audio>, I'd do something like [horrid html 5 video](video:http://example.dom/film.m4v) to generate <video src="http://example.dom/film.m4v">horrid html 5 video</video> and if someone wanted to wrap an <a>, I'd force them to do [[horrid html 5 video](http://example.dom/film.m4v)](video:http://example.dom/film.m4v) (under the logic of "if you're going to want a quirks mode for browsers that don't support html five, you're going to have to do it yourself; <video> and <audio> won't be generally useful until a critical mass of browsers support it, and when they do it won't be particularly useful to have the backwards compatability. And if I 'm going to embed a video link marked as video, I'd want to just use the html that's appropriate for it.) -david parsons
Aslak Raanes wrote: | Does anyone have any toughts on how one should be using <video> & | <audio> with Markdown? Using the link or the img syntax? Aslak, As I think has been mentioned, this seems like it might be a better use case for raw HTML (which Markdown was designed to allow for), rather than some new syntax extension. I mean, really, which of the following is easier to type, remember, and understand on re-reading? Here's a video of the quick brown fox jumping over the lazy dog: !@%$[video](foxydog.m4v) Wow! Or: Here's a video of the quick brown fox jumping over the lazy dog: <video src="foxydog.m4v" controls>video</video> Wow! Where Markdown has its own syntax, rather than HTML syntax, it is almost all for cases where there is a natural, easy, and expressive way to type something in plaintext, with the main inspiration being plaintext e-mail style. But there is no natural, easy, and expressive way to represent embedded video or audio in plaintext, because that's not something anybody tries to represent in plaintext. You may as well use the HTML syntax as anything else, it seems to me. -C