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

Card Sound Plays Only After Language Selection #1736

Open
AliHassan245 opened this issue Feb 14, 2025 · 12 comments
Open

Card Sound Plays Only After Language Selection #1736

AliHassan245 opened this issue Feb 14, 2025 · 12 comments

Comments

@AliHassan245
Copy link

  • Issue: Clicking a card's image doesn't play its sound unless a language has been selected.

  • Expected Behaviour: The sound should play immediately upon clicking the card image, regardless of language selection.

Food.Chain.Sound.Problem.mp4
@AliHassan245
Copy link
Author

@llaske Sir, may I proceed with this issue?

@llaske
Copy link
Owner

llaske commented Feb 15, 2025

Look like a loading issue.
Hard to reproduce: I guess you should click as soon as possible on game selection to have this behavior.

@AliHassan245
Copy link
Author

@llaske Sir let me try if possible

@AdityaKrSingh26
Copy link

Hi @AliHassan245 i tried to reproduce the issue but i found no issue with the activity. Everything seems to be working fine.

Recording.2025-02-15.205713.mp4

@AliHassan245
Copy link
Author

@AdityaKrSingh26 there is a bug in intial behaviour of foodchain activity when cards are loaded.

@AliHassan245
Copy link
Author

@llaske Sir, this issue is very simple: the English cards load by default, but the sound files aren’t initialized until a language is selected. I'll fix this by setting the English sound files by default so they play on card click.

I have resolved the issue on my local device. Let me know if I can send a PR.

FoodChain.webm

@llaske
Copy link
Owner

llaske commented Feb 15, 2025

@AliHassan245 I can't reproduce the issue on my side, like @AdityaKrSingh26 even when I force a low speed network.

@AliHassan245
Copy link
Author

AliHassan245 commented Feb 16, 2025

@llaske Sir, I’ve double-checked with my friends, and they are also experiencing this issue. To help reproduce it, please follow the steps shown in the video:

Bug2.mp4

Issue Explanation:
When the activity is opened for the first time, the cards default to English, but the sound files are not initialized until a language is selected. However, since the cards are already in English by default, the sound files should also be initialized to English automatically, but they aren’t.

To further confirm the issue, here’s another video from a friend experiencing the same behavior:

bug1.mp4

To resolve this, I’ve ensured that the sound files are initialized to English by default, aligning them with the default English cards.

Untitled.video.-.Made.with.Clipchamp.4.mp4

@SnehalSrivastava27
Copy link

Ya I can also reproduce the issue on my end

@llaske
Copy link
Owner

llaske commented Feb 16, 2025

Can't reproduce. Are you sure you're on the latest dev branch?

Capture.video.du.2025-02-16.23-03-01.webm

@AliHassan245
Copy link
Author

AliHassan245 commented Feb 17, 2025

  • @llaske Yes Sir I'm on the latest dev branch and can confirm that the issue still exists. It's inconsistent across devices, which is puzzling, yet the problem is undeniably real and should not be overlooked.

  • On my side, I've updated the code by adding a fallback mechanism that ensures if no language is selected, the activity defaults the sound files to English—just like the cards, which already default to English. This change consistently eliminates the sound initialization issue on all affected devices. Let me know if I can share this with you in a PR.

@llaske
Copy link
Owner

llaske commented Feb 17, 2025

@AliHassan245 post your PR, I will have a look on it.

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

4 participants