fetchBatch method
Resolve multiple video IDs to audio URLs.
Implementation
@override
Future<Map<String, AudioResolverResult?>> fetchBatch({
required List<String> videoIds,
bool forceRefresh = false,
int concurrency = 5,
}) async {
try {
final result = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
'fetchBatch',
{
'videoIds': videoIds,
'forceRefresh': forceRefresh,
'concurrency': concurrency,
},
);
if (result == null) return {};
return result.map(
(key, value) => MapEntry(
key as String,
value != null
? AudioResolverResult.fromMap(value.cast<String, dynamic>())
: null,
),
);
} on PlatformException catch (e) {
throw _handleError(e);
}
}