mobage.shellapp.Music
Methods
mobage.shellapp.Music.play
This function plays back music.
- Android only supports ogg file format. iOS only supports m4a (AAC) format.
- If another application is playing music in the background, this function plays BGM after first pausing the other application. The function checks when the Music.play() or resume() functions are called.
- This function pauses the playback of music when the application is suspended. Other paused applications will not resume playing music in the background.
- This function resumes playing music from the point where it had been paused.
- This function does not provide volume controls.
- This function does not provide APIs for switching sound on or off.
Parameters
Name |
Type |
Description |
---|---|---|
fileName |
String |
String representation of sound filename |
fadeTime |
Number |
Duration (in seconds) of fade when switching music |
loopCount |
Number |
Number of times to loop |
Return value
None
Sample
mobage.shellapp.Music.pause
This function pauses music playback.
Parameters
None
Return value
None
Sample
mobage.shellapp.Music.resume
This function resumes music playback that had been paused.
Parameters
None
Return value
None
Sample
mobage.shellapp.Music.stop
This function stops music playback.
Parameters
None
Return value
None
Sample
Revision History
- 12/11/2012
- Initial release.