I have this peace of code
let request: null | http.ClientRequest = null; emitter.on("play", (url) => { if (request) { request.abort()