<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p530714615545"><aname="p530714615545"></a><aname="p530714615545"></a>Resets the audio source to be played.</p>
@@ -78,17 +83,12 @@ You use audio playback APIs to convert audio data into audible analog signals, p
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p1040814782716"><aname="p1040814782716"></a><aname="p1040814782716"></a>Defines the URI of an audio file to play.</p>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p105031612141811"><aname="p105031612141811"></a><aname="p105031612141811"></a>Defines a playback state.</p>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p3409174762710"><aname="p3409174762710"></a><aname="p3409174762710"></a>Defines the current playback position.</p>
</td>
...
...
@@ -103,11 +103,6 @@ You use audio playback APIs to convert audio data into audible analog signals, p
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p94091847102711"><aname="p94091847102711"></a><aname="p94091847102711"></a>Defines whether to loop audio playback.</p>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p12915211131910"><aname="p12915211131910"></a><aname="p12915211131910"></a>Defines whether to mute the audio.</p>
</td>
</tr>
<trid="row44091647192718"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p18937155862412"><aname="p18937155862412"></a><aname="p18937155862412"></a>on('play', function callback)</p>
</td>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p13409164722717"><aname="p13409164722717"></a><aname="p13409164722717"></a>Listens for the playback start event.</p>
...
...
@@ -123,7 +118,12 @@ You use audio playback APIs to convert audio data into audible analog signals, p
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p1409164772714"><aname="p1409164772714"></a><aname="p1409164772714"></a>Listens for the playback stop event.</p>
<trid="row712184163016"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p1167517115311"><aname="p1167517115311"></a><aname="p1167517115311"></a>on('reset', function callback)</p>
</td>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p1113134115301"><aname="p1113134115301"></a><aname="p1113134115301"></a>Listens for the playback reset event.</p>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p8410124742713"><aname="p8410124742713"></a><aname="p8410124742713"></a>Listens for the playback end event.</p>
</td>
...
...
@@ -133,7 +133,7 @@ You use audio playback APIs to convert audio data into audible analog signals, p
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p54101047102712"><aname="p54101047102712"></a><aname="p54101047102712"></a>Listens for the playback error event.</p>
</td>
</tr>
<trid="row1410154715273"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p135217361257"><aname="p135217361257"></a><aname="p135217361257"></a>on('loaderdata', function callback)</p>
<trid="row1410154715273"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p135217361257"><aname="p135217361257"></a><aname="p135217361257"></a>on('dataload', function callback)</p>
</td>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p1541054719271"><aname="p1541054719271"></a><aname="p1541054719271"></a>Listens for the data loading event.</p>
</td>
...
...
@@ -143,7 +143,7 @@ You use audio playback APIs to convert audio data into audible analog signals, p
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p116527483584"><aname="p116527483584"></a><aname="p116527483584"></a>Listens for the volume change event.</p>
</td>
</tr>
<trid="row1410124732711"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p942310426254"><aname="p942310426254"></a><aname="p942310426254"></a>on('timeupdate', function callback)</p>
<trid="row1410124732711"><tdclass="cellrowborder"valign="top"width="42.980000000000004%"headers="mcps1.2.3.1.1 "><pid="p942310426254"><aname="p942310426254"></a><aname="p942310426254"></a>on('timeUpdate', function callback)</p>
</td>
<tdclass="cellrowborder"valign="top"width="57.02%"headers="mcps1.2.3.1.2 "><pid="p18410144715271"><aname="p18410144715271"></a><aname="p18410144715271"></a>Listens for the progress change event.</p>
</td>
...
...
@@ -162,73 +162,70 @@ You use audio playback APIs to convert audio data into audible analog signals, p
```
player.on('play', (err, action) => {
if (err) {
console.log(`err returned in play() callback`);
console.error('Error returned in the play() callback.');
return;
}
console.info('Current Song duration: '+duration);
console.log(`In play callback current time: ${player.currentTime}`);
console.info('Current Player Status: '+player.state);
console.info('Pause Mp3');
console.info('Current player duration: '+ player.duration);
console.info('Current player time: ' + player.currentTime);
console.info('Current player status: '+player.state);
console.info('Pause MP3');
player.pause();
});
player.on('pause', (err, action) => {
if (err) {
console.log(`err returned in pause() callback`);
console.error('Error returned in the pause() callback.');