Fix: temp fix for aac codec error by forcing aac encode #172, Change: Failed streams will close the stream and show error

This commit is contained in:
advplyr 2021-11-13 15:24:56 -06:00
parent 8316a8c18b
commit ac72ec1317
6 changed files with 52 additions and 12 deletions

View file

@ -28,8 +28,12 @@ class StreamManager {
this.streams = this.streams.filter(s => s.id !== stream.id)
}
async openStream(client, audiobook) {
var stream = new Stream(this.StreamsPath, client, audiobook)
async openStream(client, audiobook, transcodeOptions = {}) {
if (!client || !client.user) {
Logger.error('[StreamManager] Cannot open stream invalid client', client)
return
}
var stream = new Stream(this.StreamsPath, client, audiobook, transcodeOptions)
stream.on('closed', () => {
this.removeStream(stream)