mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-31 15:19:34 +02:00
Update cast button on fullscreen player
This commit is contained in:
parent
c4c6377925
commit
13665af0ed
3 changed files with 16 additions and 3 deletions
|
@ -39,11 +39,18 @@ import { AbsAudioPlayer } from '@/plugins/capacitor'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
onCastAvailableUpdateListener: null,
|
||||
isCastAvailable: false
|
||||
onCastAvailableUpdateListener: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isCastAvailable: {
|
||||
get() {
|
||||
return this.$store.state.isCastAvailable
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('setCastAvailable', val)
|
||||
}
|
||||
},
|
||||
socketConnected() {
|
||||
return this.$store.state.socketConnected
|
||||
},
|
||||
|
|
|
@ -109,7 +109,6 @@ export default {
|
|||
return {
|
||||
playbackSession: null,
|
||||
showChapterModal: false,
|
||||
showCastBtn: true,
|
||||
showFullscreen: false,
|
||||
totalDuration: 0,
|
||||
currentPlaybackRate: 1,
|
||||
|
@ -159,6 +158,9 @@ export default {
|
|||
}
|
||||
return this.showFullscreen ? 200 : 60
|
||||
},
|
||||
showCastBtn() {
|
||||
return this.$store.state.isCastAvailable && !this.isLocalPlayMethod
|
||||
},
|
||||
isCasting() {
|
||||
return this.mediaPlayer === 'cast-player'
|
||||
},
|
||||
|
|
|
@ -6,6 +6,7 @@ export const state = () => ({
|
|||
playerIsLocal: false,
|
||||
playerIsPlaying: false,
|
||||
isCasting: false,
|
||||
isCastAvailable: false,
|
||||
appUpdateInfo: null,
|
||||
socketConnected: false,
|
||||
networkConnected: false,
|
||||
|
@ -76,6 +77,9 @@ export const mutations = {
|
|||
setMediaPlayer(state, mediaPlayer) {
|
||||
state.isCasting = mediaPlayer === 'cast-player'
|
||||
},
|
||||
setCastAvailable(state, available) {
|
||||
state.isCastAvailable = available
|
||||
},
|
||||
setPlayerPlaying(state, val) {
|
||||
state.playerIsPlaying = val
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue