mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-15 19:49:43 +00:00
Force AAC transcode when streaming mka+opus to desktop client
Matroska audio containers (aka mka files) with Opus codec streams inside were unplayable on the desktop client because hls.js was unable to decode the stream, resulting in an infinitely "spinning" play button. When configuring a stream, we now check for the opus codec and force AAC transcoding. Matroska containers support other codecs besides Opus, eg: mp3, which do not require transcoding and work fine before this patch, which is why we check for opus in codecsToForceAAC instead of AudioMimeType.MKA in mimeTypesToForceAAC. The AudioMimeType.OPUS mimetype is already marked as requiring transcoding but since its inside a container this check does not evaluate to true, we must check the codec explicitly.
This commit is contained in:
parent
fbe1d1eed6
commit
d9355ac3aa
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ class Stream extends EventEmitter {
|
|||
return [AudioMimeType.FLAC, AudioMimeType.OPUS, AudioMimeType.WMA, AudioMimeType.AIFF, AudioMimeType.WEBM, AudioMimeType.WEBMA, AudioMimeType.AWB, AudioMimeType.CAF]
|
||||
}
|
||||
get codecsToForceAAC() {
|
||||
return ['alac', 'ac3', 'eac3']
|
||||
return ['alac', 'ac3', 'eac3', 'opus']
|
||||
}
|
||||
get userToken() {
|
||||
return this.user.token
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue