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;
|
isLocal?: boolean;
|
||||||
showLoadingToast?: boolean;
|
showLoadingToast?: boolean;
|
||||||
showSuccessToast?: boolean;
|
showSuccessToast?: boolean;
|
||||||
|
awaitPlaybackStart?: boolean;
|
||||||
playbackStartTimeoutMs?: number;
|
playbackStartTimeoutMs?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,9 +72,10 @@ export async function playTrack(
|
|||||||
isLocal = false,
|
isLocal = false,
|
||||||
showLoadingToast = true,
|
showLoadingToast = true,
|
||||||
showSuccessToast = true,
|
showSuccessToast = true,
|
||||||
|
awaitPlaybackStart = false,
|
||||||
playbackStartTimeoutMs = 6000
|
playbackStartTimeoutMs = 6000
|
||||||
} = options;
|
} = options;
|
||||||
const shouldAwaitPlayback = showLoadingToast && !isCasting();
|
const shouldAwaitPlayback = awaitPlaybackStart && !isCasting();
|
||||||
|
|
||||||
// Set current track in store
|
// Set current track in store
|
||||||
setCurrentTrack(track);
|
setCurrentTrack(track);
|
||||||
|
|||||||
Reference in new issue
Block a user