0

I tested project with latest SoundJS 0.6.1, also with soundjs-NEXT libraries, got the same results.

Everything works fine on desktop, I have this issue on Android Chrome, tested on these devices: Sony Xperia T, Asus fonepad 7.

Actually I'm using so called Audio Sprites, here is the code

//init
createjs.Sound.initializeDefaultPlugins();
var assetsPath = "./audio/";
var manifest = [{src:"someAudio.mp3", data: {audioSprite: [{id:"sound1"}]}}];
createjs.Sound.alternateExtensions = ["ogg"];
createjs.Sound.addEventListener("fileload", loadSound);
createjs.Sound.registerSounds(manifest, assetsPath);

function loadSound()
{
//
}

//plays without problem, until HTML5 audio tag is used
someItem.addEventListener("mousedown",playSprite,this);
function playSprite()
{
    createjs.Sound.play("sound1", {startTime: 1000, duration: 3400});
}

But just after using this (audio tag already exists in the same page where canvas exists):

<!--HTML -->
<audio width="100%" height="30%" id="audio">
<source src="" type="audio/mp3">
        Your browser does not support the audio tag.
</audio>

//jQuery
$("#audio")[0].src="music.mp3";
$("#audio")[0].load();
$("#someButton").click(function(e) 
{           
    $("#audio")[0].play();
});

I can't use

createjs.Sound.play("sound1", {startTime: 1000, duration: 3400});

It gives no errors, just silence.

gMirian
  • 651
  • 7
  • 13

1 Answers1

0

I gave up SoundJs and finished using another Audio library

https://github.com/pupunzi/jquery.mb.audio

Supports "Audio Sprites", much more flexible and usable.

gMirian
  • 651
  • 7
  • 13