audioplayers_tizen 1.0.1
audioplayers_tizen: ^1.0.1 copied to clipboard

Tizen implementation of the audioplayers plugin.

audioplayers_tizen #

The Tizen implementation of audioplayers.

Usage #

This package is not an endorsed implementation of audioplayers. Therefore, you have to include audioplayers_tizen alongside audioplayers as dependencies in your pubspec.yaml file.

  audioplayers: ^0.18.3
  audioplayers_tizen: ^1.0.1

Then you can import audioplayers in your Dart code:

import 'package:audioplayers/audio_cache.dart';
import 'package:audioplayers/audioplayers.dart';

For detailed usage, see

Required privileges #

To use this plugin in a Tizen application, the mediastorage, externalstorage and internet privileges may be required. Add below lines under the <manifest> section in your tizen-manifest.xml file.

  • The mediastorage privilege ( must be added to play audio files located in the internal storage.
  • The externalstorage privilege ( must be added to play audio files located in the external storage.
  • The internet privilege ( must be added to play any URLs from network.

For details about Tizen privileges, see Security and API Privileges.

Some notes #

earpieceOrSpeakersToggle isn't supported on Tizen. AudioPlay will change stream routing automatically on Tizen, you can't choose speakers or earpiece.

AudioPlay supports playBytes on Tizen, to use this api, you have to modify the audioplayers.dart.

  Future<int> playBytes(
    Uint8List bytes, {
    double volume = 1.0,
    // position must be null by default to be compatible with radio streams
    Duration position,
    bool respectSilence = false,
    bool stayAwake = false,
    bool duckAudio = false,
    bool recordingActive = false,
  }) async {
    volume ??= 1.0;
    respectSilence ??= false;
    stayAwake ??= false;

    // To use this api on Tizen, you have to delete the following code
    ///if (!Platform.isAndroid) {
    ///  throw PlatformException(
    ///    code: 'Not supported',
    ///    message: 'Only Android is currently supported',
    ///  );

    final int result = await _invokeMethod('playBytes', {
      'bytes': bytes,
      'volume': volume,
      'position': position?.inMilliseconds,
      'respectSilence': respectSilence,
      'stayAwake': stayAwake,
      'duckAudio': duckAudio,
      'recordingActive': recordingActive,

    if (result == 1) {
      state = AudioPlayerState.PLAYING;

    return result;
pub points


Tizen implementation of the audioplayers plugin.

Repository (GitHub)
View/report issues


API reference






Packages that depend on audioplayers_tizen