Skip to content

Commit

Permalink
Fix MiniPlayer slow to appear bug for audio
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdowney committed May 7, 2024
1 parent 5bc88bb commit bb23a18
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/services/playerAudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { checkIfFileIsDownloaded, getDownloadedFilePath } from '../lib/downloade
import { getStartPodcastFromTime } from '../lib/startPodcastFromTime'
import { getAppUserAgent } from '../lib/utility'
import { PV } from '../resources'
import { goToCurrentLiveTime, setLiveStreamWasPausedState } from '../state/actions/player'
import { goToCurrentLiveTime, setLiveStreamWasPausedState, showMiniPlayer } from '../state/actions/player'
import { updateHistoryItemsIndex } from '../state/actions/userHistoryItem'
import PVEventEmitter from './eventEmitter'
import { getPodcastCredentialsHeader } from './parser'
Expand Down Expand Up @@ -209,6 +209,14 @@ export const audioLoadNowPlayingItem = async (
await audioHandleLoadClip(item, shouldPlay)
}

/*
This should be called in an action, but we don't want to
wait for debouncedAudioSyncPlayerWithQueue to finish, so we're
calling it in the service.
I'm not adding this in playerVideo because there is no auto-queue to be synced.
*/
showMiniPlayer()

await debouncedAudioSyncPlayerWithQueue()

return item
Expand Down

0 comments on commit bb23a18

Please sign in to comment.