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

Android: Sound volume property not working if set at creation time #14108

Open
1 task done
Informate opened this issue Sep 6, 2024 · 3 comments
Open
1 task done

Android: Sound volume property not working if set at creation time #14108

Informate opened this issue Sep 6, 2024 · 3 comments

Comments

@Informate
Copy link

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

The sound volume property not working if set at creation time on Android

const sound=Titanium.Media.createSound({ url, volume});

FIXING WORKAROUND:

Set it separately:

sound.volume=volume;

Expected Behavior

Set the sound volume

Actual behavior

Play as 1 or as 0

Reproducible sample

X

Steps to reproduce

X

Platform

Android

SDK version you are using

12.4.0.GA

Alloy version you are using

No response

@Informate Informate added bug needs triage This issue hasn't been reviewed by maintainers labels Sep 6, 2024
@m1ga
Copy link
Contributor

m1ga commented Sep 16, 2024

working fine here

var win = Ti.UI.createWindow();
var tf = Ti.UI.createTextField({value: "0.5"})

win.addEventListener("click", function() {
	var player = Ti.Media.createSound({
		url: "/boing.mp3",
		volume: tf.value
	});
	player.play();

})
win.add(tf);
win.open();

i can change the volume in the textfield and click in the window to play the sound. The volume is changing.

Tested with Ti 12.4.0.GA

@m1ga m1ga added android and removed needs triage This issue hasn't been reviewed by maintainers labels Sep 16, 2024
@m1ga
Copy link
Contributor

m1ga commented Sep 18, 2024

@Informate did you test the code and verify if it is working for you too?

@Informate
Copy link
Author

I will do it as soon as I'll can. Anyway I found the volume problem inside a service. I'll make a deeper test but it will take some time.

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

No branches or pull requests

2 participants