open method
Future<void>
open(
- GeneralLibraryPlayerPlayableBase playable, {
- bool play = true,
- bool isLoop = false,
Implementation
Future<void> open(
GeneralLibraryPlayerPlayableBase playable, {
bool play = true,
bool isLoop = false,
}) async {
if (playable is GeneralLibraryPlayerMediaBase) {
// GeneralLibraryPlayerMediaBase generalLibraryPlayerMediaBase = (playable);
await player.open(
playable.toMediaMediaKit(),
play: play,
);
}
if (playable is GeneralLibraryPlayerPlayListBase) {
await player.open(
playable.toPlayListMediaKit(),
play: play,
);
}
if (isLoop) {
await player.setPlaylistMode(PlaylistMode.loop);
}
return;
}