shaffex

Actions

playSystemSound


ZStack is a container that overlays its children, aligning them in both axes.

<body>
    <button action="playSystemSound:1009">playSystemSound3:1009</button>
</body>

Example


playAudio


playAudio This actions play sounds from various sources: a URL, a local file, or an embedded resource.

Play from URL

<button action="playAudio:url:https://shaffex.com/MagicUiDemo/Resources/audio/LadyGaga.mp3">Play from url</button>

Play from local file

<button action="playAudio:file:test.mp3">Play from file</button>

Play from resource file

<button action="playAudio:resource:test.mp3">Play from resource</button>

Example how to play audio from various source and how to copy audio from utl to file

<body>
<vstack>
    <button action="playAudio:url:https://shaffex.com/MagicUiDemo/Resources/audio/LadyGaga.mp3">Play from url</button>
    <button action="playAudio:file:test.mp3">Play from file</button>
    <button action="playAudio:resource:test.mp3">Play from resource</button>
</vstack>

<files>
  <copy src="url:https://shaffex.com/MagicUiDemo/Resources/audio/LadyGaga.mp3" dst="test.mp3"/>
</files>

</body>

setAudioSession


ZStack is a container that overlays its children, aligning them in both axes.