[GRLUG] audio tags

Topher topher at codeventure.net
Thu Nov 17 17:21:02 EST 2011


On Thu, 17 Nov 2011, Bob Kline wrote:

> That's my Linux and browser setup as well. Re "all the malformations," 
>  I'm unclear as to why one uses html if the tags are  for html5?  
> 
> When you say "worked fine," is that  with the test file I was using?  If 
> so, there's still a kink.
> 
> I have no idea why the <head> tag is  needed here.

Because the html5 doctype you're calling requires it.  It's part of the 
standard markup for any html5 page.

> 
>    -- Bob
> 
>  
> 
> On Thu, Nov 17, 2011 at 4:45 PM, Ben Rousch <brousch at gmail.com> wrote:
>       Despite all of the malformations, the original code actually
>       worked fine on my Google Chrome, Ubuntu 11.10.
> 
> 
> On Thu, Nov 17, 2011 at 4:43 PM, Topher <topher at codeventure.net>
> wrote:
>       On 11/17/2011 04:27 PM, Bob Kline wrote:
>       > <!DOCTYPE html5>
>       > <body>
>       > <audio controls="controls">
>       > <source src="kk.mp3" type="audio/mp3" />
>       > Your browser does not support the audio tag.
>       > </audio>
>       > </body>
>       > </html5>
>       >
>       >
>       > The file is called xx.html5
> 
> I'm assuming your web server knows how to deal with .html5
> files.
> 
> In your code sample above there's no <head></head>, and there's
> no
> <html></html>.  This would cause the file to not be valid html,
> and
> could easily make the browser freak out.  Here's the proper
> code:
> 
> 
> <!DOCTYPE html5>
> <html>
>        <head>
>                <title>Bob's awesome audio</title>
>        </head>
>        <body>
>                <audio controls="controls">
>                        <source src="kk.mp3" type="audio/mp3" />
>                        Your browser does not support the audio
> tag.
>                </audio>
>        </body>
> </html>
> 
> Indenting is not necessary, I just did it for clarity.
> 
> Keep in mind that Firefox won't play mp3's and I don't think IE
> will
> play ogg.  That's why they made it possible, and suggest, that
> you put
> source tags for both audio formats.  The browser plays the one
> it can.
> 
> All that said, you might want to check out
> http://mediaelementjs.com/
> 
> It's a small javascript app that detects browsers nicely and
> makes an
> html5 player with the proper file format and falls back to flash
> when
> the browser can't do html5.
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> 
> 
> 
> 
> --
>  Ben Rousch
>    brousch at gmail.com
>    http://clusterbleep.net/
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> 
> 
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the grlug mailing list