fix(playback): avoid restore wait on normal play
This commit is contained in:
1 parent
e1de9235cf
commit
10eb06c928
1 file changed
+3
-1
@@ -34,6 +34,7 @@ export interface PlayTrackOptions {
|
||||
isLocal?: boolean;
|
||||
showLoadingToast?: boolean;
|
||||
showSuccessToast?: boolean;
|
||||
awaitPlaybackStart?: boolean;
|
||||
playbackStartTimeoutMs?: number;
|
||||
}
|
||||
|
||||
@@ -71,9 +72,10 @@ export async function playTrack(
|
||||
isLocal = false,
|
||||
showLoadingToast = true,
|
||||
showSuccessToast = true,
|
||||
awaitPlaybackStart = false,
|
||||
playbackStartTimeoutMs = 6000
|
||||
} = options;
|
||||
const shouldAwaitPlayback = showLoadingToast && !isCasting();
|
||||
const shouldAwaitPlayback = awaitPlaybackStart && !isCasting();
|
||||
|
||||
// Set current track in store
|
||||
setCurrentTrack(track);
|
||||
|
||||
Reference in new issue
Block a user