open method

Future<void> open(
  1. GeneralSystemDeviceLibraryPlayerPlayableBase playable, {
  2. bool play = true,
  3. bool isLoop = false,
})

UncompleteDocumentation

Implementation

Future<void> open(
  GeneralSystemDeviceLibraryPlayerPlayableBase playable, {
  bool play = true,
  bool isLoop = false,
}) async {
  if (playable is GeneralSystemDeviceLibraryPlayerMediaBase) {
    // GeneralSystemDeviceLibraryPlayerMediaBase generalSystemDevice_system_deviceLibraryPlayerMediaBase = (playable);
    await player.open(
      playable.toMediaMediaKit(),
      play: play,
    );
  }
  if (playable is GeneralSystemDeviceLibraryPlayerPlayListBase) {
    await player.open(
      playable.toPlayListMediaKit(),
      play: play,
    );
  }
  if (isLoop) {
    await player.setPlaylistMode(PlaylistMode.loop);
  }
  return;
}