Stuff
All checks were successful
Deploy Feature / deploy-feature (push) Successful in 27s

This commit is contained in:
Johnny322
2026-03-02 21:21:25 +01:00
parent 551b5a76d8
commit 40d2e928aa

View File

@@ -406,7 +406,8 @@ export default {
audioUnlocked: true,
latestRemoteState: null as RealtimeState | null,
viewerTeamId: '',
guessingTeamId: null as string | null
guessingTeamId: null as string | null,
pauseTransitionLockUntil: 0
}
},
async mounted() {
@@ -591,6 +592,7 @@ export default {
this.latestRemoteState = null
this.viewerTeamId = ''
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
this.setGameInUrl('')
},
async connectSession() {
@@ -735,6 +737,7 @@ export default {
this.tiles[key].status = 'paused'
this.lastAwardedTeamId = null
this.guessingTeamId = teamId
this.pauseTransitionLockUntil = Date.now() + 1200
this.isAnswerClip = false
const player = this.getPlayer()
player?.pause()
@@ -964,6 +967,7 @@ export default {
this.currentClipUrl = ''
this.lastAwardedTeamId = null
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
this.teams = this.teams.map((team) => ({ ...team, score: 0 }))
const randomTeam = this.teams[Math.floor(Math.random() * this.teams.length)]
this.currentSelectorId = randomTeam?.id || null
@@ -980,6 +984,7 @@ export default {
this.lastAwardedTeamId = null
this.isAnswerClip = false
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
this.teardownAudio()
this.queueStateSync()
},
@@ -1028,6 +1033,7 @@ export default {
this.currentClipUrl = encodeURI(clue.song)
this.isAnswerClip = false
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
await nextTick()
const player = this.getPlayer()
if (player) {
@@ -1043,6 +1049,7 @@ export default {
if (status === 'playing') {
this.tiles[key].status = 'paused'
this.guessingTeamId = this.currentSelectorId
this.pauseTransitionLockUntil = 0
const player = this.getPlayer()
player?.pause()
this.queueStateSync()
@@ -1050,7 +1057,9 @@ export default {
}
if (status === 'paused') {
if (Date.now() < this.pauseTransitionLockUntil) return
this.tiles[key].status = 'guessed'
this.pauseTransitionLockUntil = 0
this.lastAwardedTeamId = null
if (clue.answer) {
this.currentClipUrl = encodeURI(clue.answer)
@@ -1077,6 +1086,7 @@ export default {
this.currentClipUrl = ''
this.lastAwardedTeamId = null
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
this.checkEnd()
this.queueStateSync()
}
@@ -1089,6 +1099,7 @@ export default {
if (status === 'paused') {
this.tiles[key].status = 'playing'
this.pauseTransitionLockUntil = 0
this.guessingTeamId = null
const player = this.getPlayer()
player?.play().catch(() => {})
@@ -1102,6 +1113,7 @@ export default {
this.currentClipUrl = ''
this.isAnswerClip = false
this.guessingTeamId = null
this.pauseTransitionLockUntil = 0
const player = this.getPlayer()
player?.pause()
this.teardownAudio()