Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
17 lines
398 B
JavaScript
Executable file
17 lines
398 B
JavaScript
Executable file
'use strict';
|
|
|
|
var ringtonePlayer = new Audio();
|
|
|
|
// Get ringer file path from settings
|
|
var phoneSoundURL = new SettingsURL();
|
|
SettingsListener.observe('dialer.ringtone', '', function(value) {
|
|
ringtonePlayer.pause();
|
|
ringtonePlayer.src = phoneSoundURL.set(value);
|
|
});
|
|
|
|
document.body.addEventListener('click', function(evt) {
|
|
if (evt.target.id == 'ring') {
|
|
ringtonePlayer.play();
|
|
}
|
|
});
|
|
|