HomeDocs
Skip to main content

destroyForegroundAudio

Introduction

Destroys the current instance.

Parameters

PropertyTypeRequiredDescription
audioPlayerIDStringyesUnique identifier for the audio task.
successFunctionnoCallback function to be called on success.
failFunctionnoCallback function to be called on failure.
completeFunctionnoCallback 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');
},
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_service.mi@transsion.com © 2024 MiniApp. All Rights Reserved.