fetchSingle method
Resolve a single video ID to an audio URL.
Implementation
@override
Future<AudioResolverResult?> fetchSingle({
required String videoId,
bool forceRefresh = false,
}) async {
try {
final result = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
'fetchSingle',
{
'videoId': videoId,
'forceRefresh': forceRefresh,
},
);
if (result == null) return null;
return AudioResolverResult.fromMap(result.cast<String, dynamic>());
} on PlatformException catch (e) {
throw _handleError(e);
}
}