Created
February 3, 2018 17:23
-
-
Save kyorohiro/77738288a7700698412c8059b4f8b25a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ibrary umiuni2d_media; | |
import 'dart:async'; | |
abstract class MediaManager { | |
String get assetsRoot; | |
Future<MediaManager> setupMedia(String path); | |
Future<AudioPlayer> loadAudioPlayer(String playerId, String path); | |
Future<AudioPlayer> createAudioPlayer(String playerId, String path); | |
AudioPlayer getAudioPlayer(String id); | |
} | |
abstract class AudioPlayer { | |
String get playerId; | |
String get url; | |
Future<AudioPlayer> prepare(); | |
Future<double> getCurrentTime(); | |
Future<AudioPlayer> seek(double currentTime); | |
Future<AudioPlayer> play(); | |
Future<AudioPlayer> pause(); | |
FutureOr<AudioPlayer> stop(); | |
Future<double> getVolume(); | |
void setVolume(double v); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment