Skip to content

Instantly share code, notes, and snippets.



Last active Jun 10, 2016
What would you like to do?
Play iOS system sound(Uno and Native JavaScript Modules) in button click event handler
var play = require("SoundPlayer").Play;
function buttonPlayClicked(){
module.exports = {
buttonPlayClicked: buttonPlayClicked
<App Theme="Basic">
<DockPanel Background="{backgroundColor}">
<SoundPlayer ux:Global="SoundPlayer" />
<JavaScript File="MainView.js"/>
<Button Clicked="{buttonPlayClicked}" Text="Play"/>
using Uno;
using Uno.Collections;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
using iOS.AudioToolbox;
using iOS.Foundation;
public class SoundPlayer : NativeModule
public SoundPlayer()
AddMember(new NativeFunction("Play", (NativeCallback)Play));
static object Play(Context c, object[] args)
return null;
"Packages": [
"Icon": "",
"Includes": [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment