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

How to differentiate between a sound already played or about to be played based on soundID params? #1709

Open
bundely opened this issue Feb 16, 2024 · 0 comments
Labels

Comments

@bundely
Copy link

bundely commented Feb 16, 2024

The Problem

We currently on our games are pausing all sounds when user switches tab from game to other browser tabs. We unpause the sounds based on sound ID properties like sound._ended is false && sound._playStart is not undefined sound._paused is true.

For example 'onRevealLast' audiohook command has 5 nested commands. Right when 2 audios were playing we switching the tabs but now I am not able to play last one - sl_VannaPrompt because this soundID's properties like sound._ended is true since it never played in first place. Is there a property which can differentiate between a played sound ID and unplayed fresh soundID?

"onRevealLast":[{"command":"Play","spriteId":"s_LastPointerAwarded_FP"},
{"command":"Stop","spriteId":"s_PickerMusicLoop"},{"command":"Stop","spriteId":"s_OnePickLeft_FP","delay":7802},{"command":"Play","spriteId":"s_DrumRollAloneLoop","loop":-1,"delay":7802},{"command":"Play","spriteId":"s_Bonus2MusicLoop","loop":-1,"delay":8259},{"command":"Play","spriteListId":"sl_VannaPrompt","delay":8259}],

Reproducible Example

No response

Reproduction Steps

Check for multiple soundIDs under one howlInstance. Sound ID parameters of sound id played and completed are same as sound id which has not begun playing yet.

Possible Solution

If we have sound properties that would differentiate between played and unplayed sound ID then it would make it easier to differentiate.

Context

No response

Howler.js Version

2.2.3

Affected Browser(s)/Versiuon(s)

chrome, safari

@bundely bundely added the bug label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant