0

I'm using soundjs to build a simple sound mixer with standard pause/play/scrub functionality for each track.

I have everything working well, from creating a manifest, to creating soundInstances per "track" when they are added to a play list.

But I cannot find in the documentation or available information on soundjs how to dynamically establish whether the play state of a specific soundInstance is playing or paused.

Though I can track the "playState" property, this does not appear to tell me what I need to know. It only says whether a soundInstance is "playFinished" or "playSucceeded".

Checking this property on a soundInstance which has been already paused through soundInstance.pause() yields a "playSucceed". Checking it again after the soundInstance has been resumed through a soundInstance.resume() also yields a "playSucceeded" value.

While I can track play state separately, it would seem like a much cleaner approach to just be able to check the soundInstance itself to determine things like: "completed" (stopped), "paused", "playing", etc.

Is there no better way to do this through the soundInstance?

Thanks

Jeff

4

1 回答 1

0

这已作为 SoundInstance.paused添加到github 上可用的 SoundJS NEXT

希望有帮助。

于 2014-10-14T16:17:21.520 回答