Closed mlican closed 9 months ago
What the library does is just fetching data from the youtube servers, can you provide a code where I can reproduce the issue?
What the library does is just fetching data from the youtube servers, can you provide a code where I can reproduce the issue?
I apologize for my previous imprecise expression. When parsing closedCaptions
of long-duration videos, the program experiences lag or crashes. The specific test code is as follows:
var yt = YoutubeExplode();
String videoId = '5OdVJbNCSso';
var trackManifest = await yt.videos.closedCaptions
.getManifest(videoId);
List<ClosedCaptionTrackInfo> trackInfoList =
trackManifest.tracks.toList();
if (trackInfoList.isNotEmpty) {
ClosedCaptionTrack track = await yt
.videos.closedCaptions
.get(trackInfoList.first);
List<ClosedCaption> captions =
track.captions.toList();
print("captions.length:${captions.length}");
}
yt.close();
I just realeased a new version: 2.0.3
, could you try updating and see if now it works?
I jsut realease a new version:
2.0.3
, could you try updating and see if now it works? After updating to version2.0.3
, there is no longer an issue with thread blocking. It's fantastic. In the previous version,2.0.2
, I created a separate thread to parseclosedCaptions
. Although it didn't block the main thread, the processing speed was not as fast as in version2.0.3
. Now the problem is resolved. Thank you again!
The program tends to freeze and become unresponsive when downloading videos that exceed a duration of 30 minutes.