Good day dojoer,
I would like to purpose a project idea to enrich DOJO toolkit. I called it "DOJO Sound", sound is something is very important but yet we almost forget to implement into DOJO. This project is born from my current project at church, we want something to play sound but it is so difficult to implement only using Flash (notice it is very painful to edit in flash after you implemented it) and yet we need to have JS support as well (we need to understand whether the sound is finished playing or not). After a little thought, hm why dont we implement it into JS + Flash instead full Flash... A some time to spend into research and this (http://www.schillmania.com/projects/soundmanager2/) support the idea of this project. It is almost perfect thing to have, it has almost all we need but what it lacks is the unification and easy to use and rich features...
Unification feature
this feature is very hot nowadays since so many people races to show the world about their idea and forget about the sake of API heterogeneity. The soundmanager2 only support Flash8 which I am pretty sure not all user can play it... We can have our protocol to define what candidate technologies should have such as (sound playing capability [this is very must requirement otherwise what for?] and JS interaction to communicate between JS and tech candidate). This feature also can help to reduce coupling between user and tech API itself (where the soundmanager2 lacks).
Easy to use and rich feature
I would say API and documentation in soundmanager need to be improved. It is true that the library is so simple and hit on the mark but it just plain boring to play a single sound and that is it... So it is highly recommended to extend the library more such as providing a huge option to feed input for playlist (xml or text file or direct value) and robust event management.
This library will suit well with DOJO since we have almost many things like Dijit (rich in interface, we can define interface in on top layer of this library) and strong JS foundation (dojo with event handling and so on)...
I would say this project will boost DOJO popularity since so many people tries to get every online nowadays and of course they want to make user to get fancy because of their website (cool image, cool 3d, and of course little sound effect). This project can be extended for more... Instead only sound maybe we can say to support movie as well... Since sound is kind of subset of movie player library...
Ah! forgot to mention, I attached some images to support this idea! Please comment this idea and dont hestitate to give suggestion or opinion! Thanks!
| Attachment | Size |
|---|---|
| DOJO Sound - Overview.gif | 14.58 KB |
| DOJO Sound - Use Case.gif | 16.44 KB |
| DOJO Sound - Class Diagram.gif | 13.72 KB |

It's under development already.
...this is the nominal purpose of the DojoX A/V project and although I haven't been able to get back to it yet (in the process of developing a Flash-based rendering engine for dojox.gfx) my current game plan is to try to get this in before the 1.3 release.
The foundation groundwork for this has been laid down with the newer dojox.embed "project", which is set up to allow you to embed (so far) Flash and Quicktime on the fly, with support for applets coming soon.
The plans include a simple sound player, entirely skinned from HTML/JS, for a Jukebox (playlist player), and (if feasible) a Tuner control for streaming MP3 playing. Control will be accomplished through the use of Flash's ExternalInterface (I've done this before already).
Cool!
Hi ttrenka,
Ah! I didnt notice if it is already under development... I was aware with dojox.av but from the API perspective it sounds like solving embedding problem... where it is quite different with what I purposed... It sounds good to have dojox.embed and correct me if I am wrong... it is more like general purpose for embedding the external tech into HTML (for example Flash), I think more specialized library is recommended even we can purpose to have bigger library (such as dojox for experimental but we have a new special library called "demb" to sort out all problem regarding to external tech, so current dojox.embed as core base for "demb" and some child library such as demb.sound, demb.gfx). How about that? Of course, we need to change the name "demb", it quite a bit lame... (I cant think good name in couple minutes, hehe!)
Is that Haxe or AS3 based (or do you accept both)
sounds interesting. Right now I am experimenting with a Flash thing for a custom Comet transport. But what is the preferred dojo flash development environment ? I am using Haxe, because it is so much easier to set up a command line based development environment, but if dojo has a AS3 strategy and a suggested way to set up a build toolchain (preferably part of dojo custom build process), maybe I should align it with that, if it exists ...
regards
--
Roberto Saccon
http://rsaccon.com
There's a new project called "deft".
It's in a repo at the same level as dojo/dijit/dojox, and it's Flex-based. It's still in the very early stages of development but the idea is that it will contain all AS3 and MXML files used to build any movies that are consumed by the rest of the toolkit.
Code in deft will be compilable with the Flex Open Source edition but because of license constraints we will not distribute any of the Flex environment on our own. In any deft project, there will be at least 2 build scripts (one for Windows, one for UNIX) in the root so that you can compile on your own.
I was trying to avoid using MXML but apparently with Flex v.3, you cannot create anything without it (I had this confirmed with Adobe's engineers), but soon enough there should be some examples you can follow to create your own movies. The goal of deft is be a repository for anything that supports one of the three major projects, so don't expect any pure Flex applications to be checked into it (as of now, we're reserving the right to change that attitude in the future).
In conjunction with deft, there's the dojox.embed project which not only functions the same as something like SWFObject (on which it's based but without lifting any code), but also allows you to wrap any Flash movie written using ExternalInterface with a "FlashProxy" object; this allows you to embed a Flash movie and then wrap it with a native JS object that can call any of the exposed methods on the Flash movie. For example, if you've exposed methods called "getMessage" and "setMessage" on a Flash movie using ExternalInterface, you can create a FlashProxy object like so:
p.setMessage("This is a test");
console.log(p.getMessage()); // will print "This is a test" to the console
In addition, deft includes a pass-through to the Firebug console (in the form of deft.common.debugging.console) which you can use in your Flex code to pass through any debugging messages; it's like trace but lets you push it out to the browser instead of having to work in the Flash Debug player.
Bear in mind that all of the code in deft is in the very early stages of development and the majority of it is untested at this point.
Hope that helps.
thanks for clarification
these all sounds great to me, once the build scripts are out, will rewrite/convert my stuff to AS3.
Psych Desktop has a sound
Psych Desktop has a sound system that will be ported to dojo once it's 1.0 release is made. It has support for multiple backends such as flash, HTML5 <audio>, and (as a fallback) <embed>.
sound.play();
//once sound loads
if(sound.capabilites.id3)
alert(dojo.toJson(sound.id3()));
sound.pause();
sound.stop();
//etc.
http://docs.psychdesktop.net/?q=jsdoc/api/HEAD/api.Sound