diff --git a/client/players/LocalAudioPlayer.js b/client/players/LocalAudioPlayer.js index 12c4d42f..87b3c1d7 100644 --- a/client/players/LocalAudioPlayer.js +++ b/client/players/LocalAudioPlayer.js @@ -46,7 +46,7 @@ export default class LocalAudioPlayer extends EventEmitter { this.player.addEventListener('loadedmetadata', this.evtLoadedMetadata.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 = {} mimeTypes.forEach((mt) => { var canPlay = this.player.canPlayType(mt) diff --git a/client/plugins/constants.js b/client/plugins/constants.js index e7da4cc9..218f415e 100644 --- a/client/plugins/constants.js +++ b/client/plugins/constants.js @@ -1,6 +1,6 @@ const SupportedFileTypes = { 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'], info: ['nfo'], text: ['txt'], diff --git a/server/objects/Stream.js b/server/objects/Stream.js index 6e27033c..19ea46e0 100644 --- a/server/objects/Stream.js +++ b/server/objects/Stream.js @@ -73,7 +73,9 @@ class Stream extends EventEmitter { AudioMimeType.FLAC, AudioMimeType.OPUS, AudioMimeType.WMA, - AudioMimeType.AIFF + AudioMimeType.AIFF, + AudioMimeType.WEBM, + AudioMimeType.WEBMA ] } get userToken() { diff --git a/server/utils/constants.js b/server/utils/constants.js index 2429c325..6de2aed3 100644 --- a/server/utils/constants.js +++ b/server/utils/constants.js @@ -44,7 +44,9 @@ module.exports.AudioMimeType = { AAC: 'audio/aac', FLAC: 'audio/flac', WMA: 'audio/x-ms-wma', - AIFF: 'audio/x-aiff' + AIFF: 'audio/x-aiff', + WEBM: 'audio/webm', + WEBMA: 'audio/webm' } module.exports.VideoMimeType = { diff --git a/server/utils/globals.js b/server/utils/globals.js index 84205fce..d8999152 100644 --- a/server/utils/globals.js +++ b/server/utils/globals.js @@ -1,6 +1,6 @@ const globals = { 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'], SupportedVideoTypes: ['mp4'], TextFileTypes: ['txt', 'nfo'],