getManifest method
Gets the manifest that contains information about available streams in the specified video.
Implementation
Future<StreamManifest> getManifest(dynamic videoId) {
videoId = VideoId.fromString(videoId);
return retry(_httpClient, () async {
final streams = await _getStreams(videoId).toList();
if (streams.isEmpty) {
throw VideoUnavailableException(
'Video "$videoId" does not contain any playable streams.',
);
}
final response = await _httpClient.head(streams.first.url);
if (response.statusCode == 403) {
throw YoutubeExplodeException(
'Video $videoId returned 403 (stream: ${streams.first.tag}',
);
}
return StreamManifest(streams);
});
}