adriengibrat / jquery-soundmanager Goto Github PK
View Code? Open in Web Editor NEWUse SoundManager2 with jQuery
Use SoundManager2 with jQuery
I wanted to use this script for generating sounds on click events and other things and did not want to have to build a UL playlist I wanted to use createSound which is part of Sound Manager 2 but its not included in this jquery wrapper. So I wanted to request that be put in.
How to reproduce:
Expected result : the demo should load successfully
Actual result : the demo doesn't load
More info : when you switch on the tab here is the log :
-- SoundManager 2 failed to load (security/load error) --
soundManager.disable(): Shutting down
soundManager: Failed to initialise.
soundManager: No Flash response within expected time.
Likely causes: Flash blocked or JS-Flash security error.
soundManager: Getting impatient, still waiting for Flash...
soundManager::initMovie(): Waiting for ExternalInterface call from Flash..
soundManager::createMovie(): Trying to load /swf/soundmanager2_flash9_debug.swf
-- SoundManager 2 V2.97a.20110801 (AS3/Flash 9) + HTML5 audio, MovieStar mode, normal polling --
-- SoundManager 2: HTML5 support tests (/^(probably|maybe)$/i): mp3: true (preferring flash), mp4: true (preferring flash), ogg: false (and no flash support), wav: true --
The log then quickly changes into :
soundManager::init(): Already called?
soundManager::init()
soundManager::externalInterfaceOK() (~2 ms)
-- SoundManager 2 failed to load (security/load error) --
soundManager.disable(): Shutting down
soundManager: Failed to initialise.
soundManager: No Flash response within expected time.
Likely causes: Flash blocked or JS-Flash security error.
soundManager: Getting impatient, still waiting for Flash...
soundManager::initMovie(): Waiting for ExternalInterface call from Flash..
soundManager::createMovie(): Trying to load /swf/soundmanager2_flash9_debug.swf
-- SoundManager 2 V2.97a.20110801 (AS3/Flash 9) + HTML5 audio, MovieStar mode, normal polling --
-- SoundManager 2: HTML5 support tests (/^(probably|maybe)$/i): mp3: true (preferring flash), mp4: true (preferring flash), ogg: false (and no flash support), wav: true --
From the README:
You can use all SM2 default options, plus the followings
However, if I try to pass anything other than the $.playable-specific options, they don't take. For example, this doesn't work; it loads Flash 8 and uses the console for debugging:
$.playable('/path/to/swf/');
$('ul.playlist').playable({
flashVersion: 9,
useConsole: false
});
and the same goes for this:
$.playable('/path/to/swf/', {
flashVersion: 9,
useConsole: false
});
$('ul.playlist').playable();
but this works correctly:
soundManager.flashVersion = 9;
soundManager.useConsole = false;
$.playable('/path/to/swf/');
$('ul.playlist').playable();
Tested against SoundManager 2 V2.95b.20100101.
Hi Adrien,
Great work on this plugin by the way... It's exactly what i've been looking for.
However I do have a problem. Your demo ui script that has a built in progress bar and time counters doesn't seem to work in firefox 8 using jQuery 1.7.1. I haven't tested earlier versions of firefox or jquery. All is fine in all other major browsers.
It appears that the whileloading callbacks are not functioning as expected and possibly causing a silent javascript error.
Any ideas on how I could go about fixing this?
In your example under how to modify Sound Objects, README line 27 should be changed from
$('.playlist').playable('setSound', 50); // reduce sound to 50% for the whole playlist
to
$('.playlist').playable('setVolume', 50); // reduce sound to 50% for the whole playlist
A screenshot would help people get an idea what your stock CSS looks like.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.