-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
Description
How do I properly close a playing stream returned from Track.prototype.play?
I'm building a cli-based mp3 player and wanted to start a new song. therefore I have to close the currently playing song. Tried track.end(); but then it takes a lot of time before ending the stream sequence. Is this due to the nature of the PassThrough stream implementation?
mpg123 = child_process.spawn('mpg123', ['-']);
track.play().pipe(mpg123.stdin);
setTimeout(function(){ track.end(); }, 5000); // Track ends after approx 15 secs.
Reactions are currently unavailable