InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Playr 2.0: And the Best Goes On

Posted by Moxie Zhang on Feb 25, 2009

Sections
Development
Topics
Java ,
Rich Internet Apps
Tags
ActionScript

Compared with traditional application development technologies, one important aspect of rich Internet applications (RIAs) is the ease of handling media rich contents. The Playr ActionScript 3 music library is one example that helps Flash, Flex or AIR based applications easily incorporate music contents. InfoQ spoke with the Playr creator Ronny Welter for more insight.

Welter, a young Flash developer who lives in Belgium, is the Chairman of FlashFocus.nl. He describes how Playr was born of his many deadline crunching projects:

I was working on a project, for which I needed a music player that could handle different playlists. I figured this is Flash! I ran a quick search on the Web, only to find there was no library out there that did what I really needed. Since I was in a hurry, I created what I needed. Later, I released the class—only to get bug reports and lots of feature requests. Initially, it was called 'MusicPlayer'. When the first decent ActionScript 3 version was released, I named it Playr.

Playr makes building any kind of music player in Flash/Flex a piece of cake: easy, straight forward and quick! Playr can handle the needs for anything from a single track or a loop to a full-feature music player.

According to Welter, Playr is designed a bit like a model view controller (MVC) application that enables you to create the view and add the model and the controller in a way it fits your needs. He says:

I added register functions to make sure you could wire the handlers to the desired control in a simple way. However, if you prefer hooking everything up yourself, using event listeners, knock yourself out. There is an event for almost everything in there. This should enable everyone to accomplish whatever they want.

With respect to the challenges encountered during the development of Playr, Welter shares:

Playr was supposed to make everything easier. Therefore, building a library that is flexible, yet stays easy to use, was probably the most difficult part. Keeping it all that simple and getting Playr shaped up the way I wanted really gave me a headache sometimes. One thing that still doesn't fit right is the de duration of the track. Right now, you have to pass this value along (in seconds) using XML or a few features will not work. The ID3 tag gives you the length of the track only for the part that has been loaded. For example: if you've got a track of 240 seconds that has only been loaded halfway, ActionScript will return 120 seconds for the length property of the sound. In other words, it gives the buffered part of the track. I've tried all kinds of stuff, but I can't get the correct length right, so I'll just stick with the XML until I get this right.

As for future plans, Welter tells InfoQ:

I've got lots of ideas for Playr. I'm looking into new features, such as cross fading, Last.fm API integration, sound distortion and effects, and so forth. Right now, there is a PHP implementation of something called PlayrDiscovr. PlayrDiscovr is the automated playlist that saves time. The latest PlayrDiscovr version was written by Ward Werbrouck. I'm looking for people willing to write ASP, Ruby, ColdFusion and Python implementations for PlayrDiscovr.

I'm also working on a Visualizr class to add all kinds of sound visualizations. This isn't Playr-only, but it should be as easy to use as Playr itself.

Here are some music projects that use Playr:

http://playr.nocreativity.com/look/singletrack/

http://playr.nocreativity.com/look/fullblown/

http://walterego.be

http://tarasnovak.com/blog/2009/01/15/flex-music-player-v2/

http://guusdegraeve.be/schoolwork/transformers/

No comments

Watch Thread Reply

Educational Content

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.