Skip to content

Commit bb23a18

Browse files
committed
Fix MiniPlayer slow to appear bug for audio
#2170
1 parent 5bc88bb commit bb23a18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/services/playerAudio.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { checkIfFileIsDownloaded, getDownloadedFilePath } from '../lib/downloade
1010
import { getStartPodcastFromTime } from '../lib/startPodcastFromTime'
1111
import { getAppUserAgent } from '../lib/utility'
1212
import { PV } from '../resources'
13-
import { goToCurrentLiveTime, setLiveStreamWasPausedState } from '../state/actions/player'
13+
import { goToCurrentLiveTime, setLiveStreamWasPausedState, showMiniPlayer } from '../state/actions/player'
1414
import { updateHistoryItemsIndex } from '../state/actions/userHistoryItem'
1515
import PVEventEmitter from './eventEmitter'
1616
import { getPodcastCredentialsHeader } from './parser'
@@ -209,6 +209,14 @@ export const audioLoadNowPlayingItem = async (
209209
await audioHandleLoadClip(item, shouldPlay)
210210
}
211211

212+
/*
213+
This should be called in an action, but we don't want to
214+
wait for debouncedAudioSyncPlayerWithQueue to finish, so we're
215+
calling it in the service.
216+
I'm not adding this in playerVideo because there is no auto-queue to be synced.
217+
*/
218+
showMiniPlayer()
219+
212220
await debouncedAudioSyncPlayerWithQueue()
213221

214222
return item

0 commit comments

Comments
 (0)