arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

The Ï„ Player API

stopPlayer()

hashtag
stopPlayer()

  • Dart API: stopPlayer()arrow-up-right.

Use this verb to stop a playback. This verb never throw any exception. It is safe to call it everywhere, for example when the App is not sure of the current Audio State and want to recover a clean reset state.

Example:

</div>


        await myPlayer.stopPlayer();
        if (_playerSubscription != null)
        {
                _playerSubscription.cancel();
                _playerSubscription = null;
        }

        Lorem ipsum ...
Dart
Javascript