-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
SystemAlert.yml
34 lines (26 loc) 路 1.16 KB
/
SystemAlert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
name: Titanium.Media.SystemAlert
summary: An object for playing system sounds.
description: |
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](https://developer.apple.com/reference/audiotoolbox/1657326-system_sound_services).
extends: Titanium.Proxy
since: "6.1.0"
platforms: [iphone, ipad]
methods:
- name: play
summary: Start playing the system alert.
properties:
- name: url
summary: URL identifying the audio resource.
type: String
examples:
- title: Simple Example
example: |
Simple example of playing a WAVE file from the Resources directory.
var player = Ti.Media.createSystemAlert({url:"alert.wav"});
player.play();