release method

Future<void> release()

Implementation

Future<void> release() async {
  _logger.info('releasing player resources');
  await _player.dispose();

  // cancel all stream subscriptions
  for (final subscription in _streamSubscriptions) {
    await subscription.cancel();
  }
}