setSourceBytes method
Configures the play to read the audio from a byte array.
Implementation
@override
Future<void> setSourceBytes(
String playerId,
Uint8List bytes, {
String? mimeType,
}) async {
// Convert to data uri as workaround.
final uri = Uri.dataFromBytes(bytes, mimeType: mimeType ?? 'audio/mpeg');
await getPlayer(playerId).setUrl(uri.toString());
}