destroyForegroundAudio
Introduction
Destroys the current instance.
Parameters
Property | Type | Required | Description |
---|---|---|---|
audioPlayerID | String | yes | Unique identifier for the audio task. |
success | Function | no | Callback function to be called on success. |
fail | Function | no | Callback function to be called on failure. |
complete | Function | no | Callback function to be called on completion. |
Usage Example
// pages/index/index.js
Page({
destroyForegroundAudio() {
dlt.destroyForegroundAudio({
audioPlayerID: 'bgmId',
success: function () {
console.log('success');
},
fail: function () {
console.log('fail');
},
complete: function () {
console.log('complete');
},
});
},
});