Closed harrowmykel closed 1 year ago
You need to subscribe to the stream and then cancel the subscription, for example:
final sub = yt.videos.streams.get(stream).listen((data) {
// Process the data
});
// Somewhere else
sub.cancel(); // <-- Stop the download
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
How can we stop an ongoing stream?
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
How should this be implemented Write here (if you have considered) a way to implement this feature in the current codebase. Additional context Add any other context or screenshots about the feature request here.