mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-24 12:49:38 +00:00
Add:Chromecast support in experimental #367, Change:Audio player model for direct play
This commit is contained in:
parent
9f133ba98c
commit
89f498f31a
26 changed files with 1113 additions and 672 deletions
|
|
@ -6,7 +6,9 @@ export const state = () => ({
|
|||
showUserCollectionsModal: false,
|
||||
showEditCollectionModal: false,
|
||||
selectedCollection: null,
|
||||
showBookshelfTextureModal: false
|
||||
showBookshelfTextureModal: false,
|
||||
isCasting: false, // Actively casting
|
||||
isChromecastInitialized: false // Script loaded
|
||||
})
|
||||
|
||||
export const getters = {}
|
||||
|
|
@ -33,5 +35,11 @@ export const mutations = {
|
|||
},
|
||||
setShowBookshelfTextureModal(state, val) {
|
||||
state.showBookshelfTextureModal = val
|
||||
},
|
||||
setChromecastInitialized(state, val) {
|
||||
state.isChromecastInitialized = val
|
||||
},
|
||||
setCasting(state, val) {
|
||||
state.isCasting = val
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,6 @@ export const state = () => ({
|
|||
showEReader: false,
|
||||
selectedAudiobook: null,
|
||||
selectedAudiobookFile: null,
|
||||
playOnLoad: false,
|
||||
developerMode: false,
|
||||
selectedAudiobooks: [],
|
||||
processingBatch: false,
|
||||
|
|
@ -107,25 +106,8 @@ export const mutations = {
|
|||
state.serverSettings = settings
|
||||
},
|
||||
setStreamAudiobook(state, audiobook) {
|
||||
state.playOnLoad = true
|
||||
state.streamAudiobook = audiobook
|
||||
},
|
||||
updateStreamAudiobook(state, audiobook) { // Initial stream audiobook is minified, on open audiobook is updated to full
|
||||
state.streamAudiobook = audiobook
|
||||
},
|
||||
setStream(state, stream) {
|
||||
state.playOnLoad = false
|
||||
state.streamAudiobook = stream ? stream.audiobook : null
|
||||
},
|
||||
clearStreamAudiobook(state, audiobookId) {
|
||||
if (state.streamAudiobook && state.streamAudiobook.id === audiobookId) {
|
||||
state.playOnLoad = false
|
||||
state.streamAudiobook = null
|
||||
}
|
||||
},
|
||||
setPlayOnLoad(state, val) {
|
||||
state.playOnLoad = val
|
||||
},
|
||||
showEditModal(state, audiobook) {
|
||||
state.editModalTab = 'details'
|
||||
state.selectedAudiobook = audiobook
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue