Comments (9)
Hi, thanks for the feedback. We're not seeing this behavior in our testing. Can you please provide more information.
Specifically, can you include your code and the OS and browser version (for example win 7 IE 9). Thanks.
from soundjs.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="assets/js/soundjs.min.js"></script>
<script src="assets/js/swfobject.min.js"></script>
<script src="assets/js/soundjs.flashplugin.min.js"></script>
<script src="assets/js/preloadjs.min.js"></script>
<script>
var application = application || {};
(function(global) {
application.init = function() {
console.log('init');
createjs.FlashPlugin.BASE_PATH = "assets/js/";
createjs.Sound.registerPlugins([createjs.FlashPlugin]);
createjs.Sound.activePlugin.showOutput = true;
var manifest = [
{id:'test', src:'assets/snd/test.mp3'},
{id:'test2', src:'assets/snd/test2.mp3'},
];
application.preloader = new createjs.LoadQueue();
application.preloader.installPlugin(createjs.Sound);
application.preloader.addEventListener("complete", application.preloadOnComplete);
application.preloader.addEventListener("error", application.preloadOnError);
application.preloader.loadManifest(manifest);
}
application.preloadOnComplete = function(event) {
console.log('complete');
createjs.Sound.play('test');
createjs.Sound.play('test2');
}
application.preloadOnError = function(event) {
console.log('error');
}
}(this));
</script>
</head>
<body onload="application.init();"></body>
</html>
from soundjs.
Tested on two machines with same result:
- Windows XP, Firefox 16, latest Chrome
- Windows 7, Firefox 19, latest Chrome, IE 10
from soundjs.
Ok, I have a solution for you. You have to make sure that the FlashAudioPlugin.swf file in the directory you set for createjs.FlashPlugin.BASE_PATH. When I had this incorrect, I saw the same behavior you described.
Some other notes:
I have no idea which versions you are using given your imports. My testing was with the NEXT versions of SoundJS and PreloadJS.
The swfobject is compiled into our flashplugin-NEXT.min.js file, so you do not need to include it separately.
The last object in your manifest should not have a comma on the end.
Hope that helps.
from soundjs.
One other note - we committed the latest FlashPlugin with the wrong name - so the one you were including was out of date. I have fixed the naming issue, so the soundjs.flashplugin-NEXT.min.js is up to date now.
from soundjs.
Ok, i have fixed small mistakes and update libs. But this is not solution for me, not in this case. Look at reworked code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="soundjs-NEXT.min.js"></script>
<script src="soundjs.flashplugin-NEXT.min.js"></script>
<script src="preloadjs-NEXT.min.js"></script>
<script>
var application = application || {};
(function(global) {
application.init = function() {
console.log('init');
createjs.FlashPlugin.BASE_PATH = '';
createjs.Sound.registerPlugins([createjs.FlashPlugin]);
createjs.Sound.activePlugin.showOutput = true;
var manifest = [
{id:'test', src:'test.mp3'},
{id:'test2', src:'test2.mp3'}
];
application.preloader = new createjs.LoadQueue();
application.preloader.installPlugin(createjs.Sound);
application.preloader.addEventListener("complete", application.preloadOnComplete);
application.preloader.addEventListener("error", application.preloadOnError);
application.preloader.loadManifest(manifest);
}
application.preloadOnComplete = function(event) {
console.log('complete');
createjs.Sound.play('test');
createjs.Sound.play('test2');
}
application.preloadOnError = function(event) {
console.log('error');
}
}(this));
</script>
</head>
<body onload="application.init();"></body>
</html>
and at log:
[00:53:01.597] GET http://localhost/test/ [HTTP/1.1 200 OK 2мс]
[00:53:01.598] GET http://localhost/test/soundjs-NEXT.min.js [HTTP/1.1 200 OK 2мс]
[00:53:01.599] GET http://localhost/test/soundjs.flashplugin-NEXT.min.js [HTTP/1.1 200 OK 3мс]
[00:53:01.599] GET http://localhost/test/preloadjs-NEXT.min.js [HTTP/1.1 200 OK 6мс]
[00:53:01.657] init
[00:53:01.785] GET http://localhost/test/FlashAudioPlugin.swf [HTTP/1.1 200 OK 2мс]
[00:53:01.821] Register test.mp3
[00:53:01.834] Register test2.mp3
--
[00:53:09.659] error
[00:53:09.764] GET http://localhost/test/test2.mp3 [HTTP/1.1 200 OK 1мс]
[00:53:09.723] Preload Complete p0
--
[00:53:17.679] error
[00:53:17.680] complete
[00:53:17.685] Play Sound s1 test.mp3 o: 0 l: 0 v: 1 p: 0 mv: 1
[00:53:17.689] Play Sound s2 test2.mp3 o: 0 l: 0 v: 1 p: 0 mv: 1
[00:53:17.785] GET http://localhost/test/test.mp3 [HTTP/1.1 200 OK 0мс]
[00:53:17.785] GET http://localhost/test/test2.mp3 [HTTP/1.1 200 OK 1мс]
[00:53:18.104] Complete s2 Remaining: 1
[00:53:18.363] Complete s1 Remaining: 0
All files loaded correctly, but delays and errors still exists.
from soundjs.
Thanks for your bug report, we are seeing the same errors and tracking them down is proving to be difficult. We'll continue working on it but wanted to let you know. One note, oddly changing the order of our sound files fixed the problem for html audio, but not for Flash audio.
from soundjs.
Awesome news, the issue has been tracked down and resolved and the fix has been pushed to the NEXT version on github!
Thanks for finding and reporting this issue. It turned out to be an issue with how tags we use for loading were handled between SoundJS and PreloadJS. And solving this found a couple of other related issues that were resolved. So thanks and I hope the fix helps you.
from soundjs.
Everything works fine now. Thanks a lot.
from soundjs.
Related Issues (20)
- I get this error
- i get this error: Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD HOT 2
- I use Android Mobile , when i do createjs.Sound.registerSounds(sounds, audioPath); i get error
- How to ignore Iphone mute switch HOT 7
- sometime when IPhone safari minimize return website is mute
- Command not found.
- How to loop sound seamlessly/without gap?
- Audio Play Error (OnMediaSinkAudioError)
- SoundJS 2.0 uses `loops` instead of `loop`
- Broken Link on CreateJS website
- get current sound playing Time while playing sound
- no possiblity to pauze music with the new button in chrome 'to change the music from tab to tab'
- Play a local music file with changed frequency?
- Safari Never Auto-Play setting causes long delay ending in `fileerror` with no information. HOT 20
- SoundJS Demos not working in iOS 14
- Sound randomly stopping after minimizing/maximizing iPadOS 14.4.2 HOT 2
- Still maintained? HOT 1
- soundjs play mp3, When playing at a higher speed, the pitch becomes higher HOT 1
- soundSprite Not Properly Loading In HOT 1
- Why does audio on iOS stop when unplugging headphones?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soundjs.