youtube_explode_dart
youtube_explode_dart copied to clipboard
Fetching multiple videos with videoIDs at once
Hi guys, I don't know if I'm not doing it right, but I have a list with videoIDs where I want to get information such as title, channel name, thumbnail. With increasing numbers of ids it takes a long time to fetch these, thats my issue. When doing a search request with a specific term, it is MUCH faster. I can get this information very quick. I want to fetch multiple IDs because I want them in batches (like playlists in-app), but it really takes too much time. Is there a way to do this faster?
example:
Future
var futures = videoIds.map((videoId) async {
var video = await yt.videos.get('$videoId');
return {
'title': video.title,
'channel': video.author,
};
}).toList();
var results = await Future.wait(futures);
_videoDetails.addAll(results);
}