stopPlay abstract method

Future<void> stopPlay()

Stop playing audio file.

Available since: 1.0.0 Description: Stops the audio currently being played by the SDK. Use case: When you need to stop audio playback in advance during playback, you can call this API to stop playback. If the user needs to immediately play the next piece of audio, he needs to stop the playback of the previous piece of audio; or when he is about to leave the playback page, he should also stop the current playback. When to call: startPlay During playback. Related APIs: When this API is called to stop playback, the SDK will throw the onPlayerStopped notification. Developers can update the UI display based on this callback notification. Caution: After stopping playback or completing playback, the SDK will release the occupation of the audio device. Restrictions: Playback-related APIs cannot be used at the same time as recording-related APIs. At the same time, only recording or playback can be performed inside the SDK. Therefore, before you need to enable playback, developers must first ensure that the recording function is not being used at this time, otherwise playback will fail.

Implementation

Future<void> stopPlay();