Skip to content

ReleaseMode

Inherits: Enum

The behavior of Audio player when an audio is finished or stopped.

Properties

  • LOOP

    Keeps buffered data and plays again after completion, creating a loop.

  • RELEASE

    Releases all resources, just like calling release method.

  • STOP

    Stops audio playback but keep all resources intact.

Properties#

LOOP = 'loop' #

Keeps buffered data and plays again after completion, creating a loop. Notice that calling stop method is not enough to release the resources when this mode is being used.

RELEASE = 'release' #

Releases all resources, just like calling release method.

Info
  • On Android, the media player is quite resource-intensive, and this will let it go. Data will be buffered again when needed (if it's a remote file, it will be downloaded again).
  • On iOS and macOS, works just like Audio.release() method.

STOP = 'stop' #

Stops audio playback but keep all resources intact. Use this if you intend to play again later.