We just created a version of our mp3 player for iPhone, in no small part thanks to tips from this group.
The music player is here: http://grabb.it/iphone Or you can see our real site at http://grabb.it My write up of the experience will be at http://jchris.mfdz.com once Dreamhost fixes their DNS. Here's the text of the post. --- Unsupported - Hacking Quicktime on the iPhone At Grabb.it we're pretty serious about our music. So much so that when we finally had a chance to borrow an iPhone for the day, we jumped at the chance to build an iPhone free-range MP3 player -- little did we know where Apple stands on the idea. I'd prepared for supporting the iPhone by writing a Quicktime wrappter for our Javascript app (which usually uses Flash). Our Spec.js suite made sure the two players exposed the same methods. Everything was ready. We we're pumped about the "Ajax and web-standards as API" line Apple's been pushing. We *love* Ajax and web standards, and we're good at it. Until Apple dropped the ball. Specifically the "ENABLEJAVASCRIPT" ball. The detailed, useful, and _well documented_ API the Quicktime Plugin usually supports was nowhere to be found. Not only that, but "autoplay"="true" and friends were all MIA. h3. Plan B We setup a square-one webpage to test some embed options - it turns out that no matter what, the iPhone fetches the MP3 src immediately upon insert of the embed tag. Inserting an embed tag for each track in a 50-song playlist was out of the question. We settled on a solution which embeds the MP3 for each track when the user clicks it in a playlist. With a little css and some elbow-grease we were able to get the click-twice-to-play workflow happening, and somewhat pleasant. h3. Drawbacks Due to Apple's decision to make any playing Quicktime content modal *over the entire mobile Safari* you can't do anything else in Safari when you are listening to music. We don't anticipate being able to fix this. Hopefully Apple sees the light. Also, we haven't yet figured out how to detect that a song has ended, so continuing automatically to the next track is not supported. This feature may not be impossible... but the problems in the way are not trivial. (A) How to detect that a movie is finished - this is probably the easy one. (B) How to trigger playing of the next movie from Javascript. If we had that second one fixed we wouldn't make you click twice to play, so the returns are double for figuring it out. If anyone wants to let me borrow an iPhone, I'll spend another day on it. I already have some ideas brewing. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en -~----------~----~----~----~------~----~------~--~---
