PlaySound doesn't work as expected

I have this UX code:

<App>
	<Button Text="Play">
		<Clicked>
			<DebugAction Message="Let's play" />
			<PlaySound File="../Assets/short-ringtone-for-notification.wav"/>
		</Clicked>
	</Button>
</App>

I run this code with ‘fuse preview’ (Fuse 0.36.1 (build 12010) on OS X 10.9.5 ).
When I click the button, I got no sound and a message in console “Let’s play” - as expected - and exception notification “Unhandled exception: Cannot access a closed Stream.”.

Hi Jacek,

are you running this in local preview?
I believe it only works on device targets.

Also, don’t forget to include the “Fuse.Audio” package in your unoproj file: https://www.fusetools.com/docs/fuse/playsound

Hi, Uldis

thx for replay. “Fuse.Audio” is declared in unoproj and I have no errors during compilation. The only problem is no sound at all. But I’m running it in local preview only, I’ll try it on device.

Actually, I just checked the implementation and it looks like it should be playing on desktop, too.

I’ll get more details on this next week and post here. Until then, let’s see if it works for you on device!

It works on the device (Android 5.0.1), indeed :), hope that in local preview will start to work someday too :slight_smile:
thx for help