WAC Demo: AudioPlayer
WAC 1.0 Demo: AudioPlayer
Description
AudioPlayer is the object for WAC Audio play capabilities.
AudioPlayer is a sub-object of Multimedia. AudioPlayer is accessed directly from the object: Widget.Multimedia.AudioPlayer.XXX.
Note that, although it is desirable for widget developers to only transition between appropriate states, the widget runtime should attempt to handle incorrect transitions gracefully without throwing exceptions. E.g., if play() is called while the sound is already playing, then it should be ignored. Likewise, the widget engine should not throw an exception if stop() is called before play(). However, an exception should be called if the engine cannot gracefully resolve the situation. E.g., if play() is called before open().
void open():
This method performs preparation for playing the specified file. Preparation steps can include validating the presence of the file, validating the codec, and possibly performing some buffering at the WRT's discretion. The widget engine is responsible for file caching, etc. The following protocols are supported by the open() function: 'file://', 'http://', 'https://', and 'rtsp://'. If the parameter string doesn't start with the protocol syntax listed above, the widget engine will search the media files in the widget package. The file wil be playable after open returns. Note that supported protocols may depend on operator networks and their service policy
void pause():
Pauses the audio which is played by play function.
void play( playQty):
Play the audio which is opened by open function. This call will be ignored if the file is already playing. Parameter playQty - An integer value specifies how many times the media file should be played. The parameter name reflects the total times to play, not how many times to play in addition to the first time. Therefore, a value of '0' will result in the media never playing and a value of '1' will indicate that it should be played once. the Minimum value: 0. Maximum value: (Maximum value of int).
void resume():
Resume the audio which is paused by pause function.
void stop():
Stop the audio which is played by playing function.
Note that this widget requires WAC 1.0 APIs support in a runtime, currently implemented in Android version only.
Screenshots

Comments (3 on the original page, latest shown)
Download
Works with Opera 9 to Opera 12.
About this widget
| Downloads | 5,063 |
|---|---|
| Category | WAC Demo |
| Version | 1.2 |
| Size | 4MB |
| Last update | February 7, 2011 |
| Devices | desktop, mobile |
| Original page | Internet Archive |
I have some problems in openning it. There are some errors
abduvali7785
ab1985ha