mozilla-b2g/gaia — pull request #6495 by ian-liu (2012-11-19 15:10:26+00:00)
Title: Bug 807418 - [Clock] No way to preview an alarm tone r=alive r=rlu

Implement a feature for previewing alarm ringtone in Clock APP.
Overwrite value selector to support receiving "click" event from element.

There are two issues which are needed to high light for reviewer.
1. I can not receive "appopen", "appwillclose" to hide/stop reviewing ringtone when Clock APP is going to background.
2. After we set the "mozAudioChannelType" to audio tag, it can not to play audio when we set another src to the tag.(The tag can playback in the first time only.)

We can reference following log.
E/GeckoConsole( 8763): [JavaScript Error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLAudioElement.mozAudioChannelType]" {file: "app://clock.gaiamobile.org/js/alarm.js" line: 904}]