You are reading 12.6.0. See this page in 13.4.1.
Titanium.Media.SystemAlert
Extends Titanium.Proxy
Deprecated since 8.0.0
This iOS-only API has been deprecated and moved to the Ti.SystemAlert module in 8.0.0.
An object for playing system sounds.
You can use this module to provide audible system alerts.
You can use it to play short (30 seconds or shorter) sounds. The interface does not provide level, positioning, looping, or timing control, and does not support simultaneous playback: You can play only one sound at a time.
This module differs from the Sound module because it honors the ringtone volume, not the Music volume.
Use the Titanium.Media.createSystemAlert method to create a SystemAlert object.
Know more about System Sound Services.
Examples
Simple Example
Simple example of playing a WAVE file from the Resources directory.
var player = Ti.Media.createSystemAlert({url:"alert.wav"});
player.play();
Properties 3
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
url
StringURL identifying the audio resource.
Methods 5
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
Start playing the system alert.
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|