Background Music Queue with AVPlayer and iOS4

Update 2010-Nov-11: Apple has come out with AVQueuePlayer in iOS 4.1, and presumably most people are going to move to the latest version now that it performs well even on the 3G, but the AVPlayer can still be used to manually create a queuing of items, but if you want all the hard work to be done for you, with only a few limitations, then use AVQueuePlayer instead.

Update 2010-Oct-19: Apple has been updating their documentation slightly, and it has more information now with regard to setting up an asset. This is more specifically for video, but it might help fill in the blanks for just audio. AVPlayer Playback Guide

The iOS 4.0 framework introduced AVPlayer which allows playing a MP3s from the iTunes Music Library in the background without using the iPod music player. This has a couple benefits over the MPMusicPlayerController in that you can add new items, stop, or play music in the background. Also, a custom icon can represent your app in the multitasking menu where the ipod controls are located. If you stick with [MPMusicPlayerController iPodMusicPlayer] you can play music in the background through the ipod player, but once an app goes into the background, it no longer has control over the playback of the music.
Continue reading

Websites as Zip files?

I was just thinking, while reading some posts on how to improve Apple’s new image skimming technology, how to make websites load faster. I think that in the future websites should be downloaded as single compressed files, or a handful of compressed files in order to utilize parallelization. This way you could wrap all your images up in a .zip file, all your javascript files, all your content, etc. Sure there could still be some images loaded dynamically or separately, as well as other resources, but if you can get a speed increase by using a hack of embedding a bunch of 160×160 pixel images into a single 160×3200 pixel image in order to eliminate the multiple requests, why couldn’t you do the same thing by archiving all the images into a single or handful of archive files, and then having the browser automatically decompress or just unarchive the images and display them.

There of course needs to be new technology in place for this to happen, but I think it could be a good idea? Maybe having the images referenced differently <img src=”image.zip?imgLogo.gif”> or new attribute <img src=”imgLogo.gif” archive=”imageMain.zip”> or it could be somehow seemless using headers, or some other method where the images would download once as an archive and then be treated like cached images.

Just a quick rambling and as always I always love to hear other people’s thoughts.

Radical UI Ideas – No Applications? No Desktop?

Aza Raskin from the humanized.com team spoke at one of Google’s Tech Talks about user interface design. He starts with talking about user interface and interaction and his ideas on things to avoid and what needs to change. One cool thing he discussed was how there needs to be services, and a universal access interface (basically APIs) that would allow any interface to be used for any service and thus would allow the focus to move from the tools to the content itself and what you are trying to do with it.

The rest of the talk is mainly about how the desktop is useless for the most part as it does nothing for you in terms of content. Content is key, it’s all we care about. We want to create and manipulate content.

He speaks about removing the idea of the application, as they are silos in terms of user interface and content interaction. He presented how Microsoft Word becomes bloated trying to be Mathematica for calculations, and Photoshop for editing images, as well as being a word processor, but it does so poorly. Applications also cause user interface to become stale and toolboxes come along to make development easy but non-innovative.

He showed of Enso a product they have developed that marries the graphical user interface (GUI) with the command line interface (CLI). Non-technical people are used to CLI whenever they use google to search for something. So what Enso does is allow you to select something, then hold down the capslock key and start typing commands to manipulate the content, such as spell check, calculate, flip image horizontally, and many more. It also has a navigation command set so you can open an application or document, or switch to a different window, etc. It’s tough to explain it all, much better to see it in action, so just watch the video. It’s long, but very informative for those interested in user interface and design.