RPM Challenge 2012

Saturday, 18 September 2010

Checking in early…

… because we’re about to go and pick up a van and go out to Ikea. Probably won’t be back until the depths of night. Probably will be completely exhausted by the time we do get back. I’m loading up the iPad with lots to read because Djelibeybi wants to look at some stuff for his new (renting) flat in Scotland, so I’m expecting to be a bit bored.

Today the iPad came into its own for this project. I had to go into town to get my hair cut, so I loaded up Gusto on the iPad with the files I needed from my FTP server and did some editing and tweaking and made up the basis of the two-column template, so barring font thingys and side margins and getting it all to work in IE6 of blessed memory, this is pretty much ready, I think. YAY! Gusto’s actually pretty good. Limited at the moment, but really it’s quite useful. I wouldn’t want to code everything on it but for the moment it’s meeting my limited needs, and of course the iPad is SO much lighter and quicker to turn on than the laptop (also doesn’t have a DVD stuck in the drive which keeps trying to start itself up).

Did discover a slight issue with <audio> which I hadn’t found yesterday though. The gurus of HTML 5 online have been saying things like this:

you need to be careful about the order of the <source> elements. Because of a bug in Firefox, if you list the MP3 first (which Firefox doesn’t support), it will silently fail and refuse to render that particular <audio> element. The trick is to list the Ogg Vorbis file first and the other formats after. Webkit (Safari and Chrome) handle unsupported formats just fine.
HTML5 Doctor: http://html5doctor.com/native-audio-in-the-browser/

This seems to be fine and dandy (although I should say that it seems to be fixed in Firefox 3.6)… until you try to play it on the iPad. I haven’t tried the iPod Touch yet, but I’m guessing it’ll be much the same – with the Ogg file first, the iPad’s version of Safari chucks a wobbly and won’t play anything. With the MP3 file first, all is fine and dandy. Except of course, that it isn’t because by the sounds of things earlier versions of Firefox may break down and cry. I think it’s a case of JavaScript to the rescue here. For my current website audience, Firefox seems to be more important than the iPad, and I think (warning: gross generalisation ahead) that iPad users in general are less likely to be thinking about or switching off JavaScript than desktop users who may be constrained by workplace policies or mostly unfounded fears that their files may be attacked. At any rate, even if this isn’t the case, there are way fewer iPad users currently visiting the site and the proportion of those who may have JavaScript switched off is probably microscopic, so I’m planning on leaving the code set up for Firefox and using JavaScript to (probably) remove the offending ogg file source tag from the DOM at the first available moment. Hopefully this will work.

And now to face the horror that is Ikea…

Tagged with: code, experimenting, learning, music, programming, reading, tools, web | Add a comment

Leave a Reply