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.

eZ debug

Timing: Jan 18 2025 16:01:37
Script start
Timing: Jan 18 2025 16:01:37
Module start 'layout'
Timing: Jan 18 2025 16:01:37
Module start 'content'
Timing: Jan 18 2025 16:01:38
Module end 'content'
Timing: Jan 18 2025 16:01:38
Script end

Main resources:

Total runtime1.1158 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0104 587.9141152.6250
Module start 'layout' 0.01040.0038 740.539139.4453
Module start 'content' 0.01421.1001 779.9844438.5234
Module end 'content' 1.11430.0015 1,218.50788.1563
Script end 1.1157  1,226.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.3838160.0003
Check MTime0.00140.1284160.0001
Mysql Total
Database connection0.00120.106310.0012
Mysqli_queries1.067795.6950460.0232
Looping result0.00050.0444440.0000
Template Total1.079096.720.5395
Template load0.00210.191420.0011
Template processing1.076896.510820.5384
Template load and register function0.00020.020310.0002
states
state_id_array0.00080.074110.0008
state_identifier_array0.00090.084820.0005
Override
Cache load0.00170.1552270.0001
Sytem overhead
Fetch class attribute can translate value0.00060.057410.0006
Fetch class attribute name0.00060.055710.0006
XML
Image XML parsing0.00010.008910.0001
class_abstraction
Instantiating content class attribute0.00000.000410.0000
General
dbfile0.00060.0559100.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs