mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Add:Support for webm and webma audio files #1079
This commit is contained in:
parent
4ea1e4460a
commit
f55559e9a3
@ -46,7 +46,7 @@ export default class LocalAudioPlayer extends EventEmitter {
|
|||||||
this.player.addEventListener('loadedmetadata', this.evtLoadedMetadata.bind(this))
|
this.player.addEventListener('loadedmetadata', this.evtLoadedMetadata.bind(this))
|
||||||
this.player.addEventListener('timeupdate', this.evtTimeupdate.bind(this))
|
this.player.addEventListener('timeupdate', this.evtTimeupdate.bind(this))
|
||||||
|
|
||||||
var mimeTypes = ['audio/flac', 'audio/mpeg', 'audio/mp4', 'audio/ogg', 'audio/aac', 'audio/x-ms-wma', 'audio/x-aiff']
|
var mimeTypes = ['audio/flac', 'audio/mpeg', 'audio/mp4', 'audio/ogg', 'audio/aac', 'audio/x-ms-wma', 'audio/x-aiff', 'audio/webm']
|
||||||
var mimeTypeCanPlayMap = {}
|
var mimeTypeCanPlayMap = {}
|
||||||
mimeTypes.forEach((mt) => {
|
mimeTypes.forEach((mt) => {
|
||||||
var canPlay = this.player.canPlayType(mt)
|
var canPlay = this.player.canPlayType(mt)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const SupportedFileTypes = {
|
const SupportedFileTypes = {
|
||||||
image: ['png', 'jpg', 'jpeg', 'webp'],
|
image: ['png', 'jpg', 'jpeg', 'webp'],
|
||||||
audio: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav'],
|
audio: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav', 'webm', 'webma'],
|
||||||
ebook: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'],
|
ebook: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'],
|
||||||
info: ['nfo'],
|
info: ['nfo'],
|
||||||
text: ['txt'],
|
text: ['txt'],
|
||||||
|
@ -73,7 +73,9 @@ class Stream extends EventEmitter {
|
|||||||
AudioMimeType.FLAC,
|
AudioMimeType.FLAC,
|
||||||
AudioMimeType.OPUS,
|
AudioMimeType.OPUS,
|
||||||
AudioMimeType.WMA,
|
AudioMimeType.WMA,
|
||||||
AudioMimeType.AIFF
|
AudioMimeType.AIFF,
|
||||||
|
AudioMimeType.WEBM,
|
||||||
|
AudioMimeType.WEBMA
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
get userToken() {
|
get userToken() {
|
||||||
|
@ -44,7 +44,9 @@ module.exports.AudioMimeType = {
|
|||||||
AAC: 'audio/aac',
|
AAC: 'audio/aac',
|
||||||
FLAC: 'audio/flac',
|
FLAC: 'audio/flac',
|
||||||
WMA: 'audio/x-ms-wma',
|
WMA: 'audio/x-ms-wma',
|
||||||
AIFF: 'audio/x-aiff'
|
AIFF: 'audio/x-aiff',
|
||||||
|
WEBM: 'audio/webm',
|
||||||
|
WEBMA: 'audio/webm'
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.VideoMimeType = {
|
module.exports.VideoMimeType = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const globals = {
|
const globals = {
|
||||||
SupportedImageTypes: ['png', 'jpg', 'jpeg', 'webp'],
|
SupportedImageTypes: ['png', 'jpg', 'jpeg', 'webp'],
|
||||||
SupportedAudioTypes: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav'],
|
SupportedAudioTypes: ['m4b', 'mp3', 'm4a', 'flac', 'opus', 'ogg', 'oga', 'mp4', 'aac', 'wma', 'aiff', 'wav', 'webm', 'webma'],
|
||||||
SupportedEbookTypes: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'],
|
SupportedEbookTypes: ['epub', 'pdf', 'mobi', 'azw3', 'cbr', 'cbz'],
|
||||||
SupportedVideoTypes: ['mp4'],
|
SupportedVideoTypes: ['mp4'],
|
||||||
TextFileTypes: ['txt', 'nfo'],
|
TextFileTypes: ['txt', 'nfo'],
|
||||||
|
Loading…
Reference in New Issue
Block a user