Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little more clarification #2

Open
talamaska opened this issue Dec 11, 2013 · 3 comments
Open

Little more clarification #2

talamaska opened this issue Dec 11, 2013 · 3 comments

Comments

@talamaska
Copy link

I was looking at this game for some time now. I'm using the AssetManager with a little bit rewriting done. I have one problem with SM2. I see how are you using it, but as soon i try the same thing, it doesn't work. I'm talking about the repeatable play of some sounds that you have loaded with the AssetManager.

I have forced the html5 audio, but that's the only difference. My audio doesn't replay after it stopped playing the first time. The only solution I've found is to destruct the sound which is not exactly what I want, cause that way I have to load the sounds every time when I want to play them.

Could you please explain me what's the trick? I see you are not specifying anything for html5 audio and you are not destroying the sound object.

@sethladd
Copy link
Owner

This game is super duper old. SM2 is no longer the right way to do it. You should use Web Audio API.

I'll update the README to indicate this game is DEPRECATED. :)

@talamaska
Copy link
Author

well, still, I have already experimented with Audio/Video DOM Reference, but it doesn't change the currentTime, when I want to set it under chrome. It works on firefox, and this is exactly the same thing soundmanager is doing. So practically I don't have a way to stop and restart the sound, without reloading the audio object src using the web audio api. You know, you have only play, pause, no stop for me stop is equal to pause + currentTime = 0; You game is working because it's not using the html5 audio, but the flash. Or you are saying actually to use the AudioContext?

Well that support table doesn't inspire to invest any time on doing it. God know what will happen in mobile. Honestly though about it, but it didn't pass my evaluation.

@talamaska
Copy link
Author

seems that soundjs is the perfect solution, it supports AudioContext too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants