Audio - Mp3/Flash - SoundManager 2

Author Message

scott edmonds

Wednesday 09 July 2008 3:23:11 pm

I am developing a site with inline music player (mp3) capabilities. I, however, have run into a roadblock and maybe list members can assist my thinking.

The Goal:

To imbed an inline mp3 player with ezPublish articles. Thus, the media is played on mouse-click without leaving the current page.

(Seriously: I do not know why this is so overcomplicated to do.)

The Problem:

I believe that I can add code to the ezPublish package that will allow an inline media (mp3) player.

I sourced one inline player, SoundManager 2, with the basic code below. I think that I can apply this code and have the script work from within ezPublish. Ideas?

I'd appreciate your assistance and hope creating this thread that answers big questions in relation to mp3 audio. And if I missed something really obvious (ezPublish and inline mp3)-- please let me know. Thanks.

The minimal code needed to get SoundManager 2 going is below, with configurable parts:

----- CODE HERE -----

<-- include SM2 library -->
<script type="text/javascript" src="/path/to/soundmanager2.js"></script>

<-- configure it for your use -->
<script type="text/javascript">

soundManager.url = '/path/to/sm2-flash-movies/'; // directory where SM2 .SWFs live

// disable debug mode after development/testing..
// soundManager.debugMode = false;

soundManager.onload = function() {
// SM2 has loaded - now you can create and play sounds!
soundManager.createSound('helloWorld','/path/to/hello-world.mp3');
soundManager.play('helloWorld');
}

</script>

------>


--------::
Quote: "Someday they'll find a gene for putting on your overcoat." - Carlin
-------::

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.