fix(player): fix video preload
This commit is contained in:
parent
a9798007cc
commit
e21f0f5153
1 changed files with 4 additions and 1 deletions
|
|
@ -493,7 +493,10 @@ export class Player {
|
||||||
const isPodcast = track.isPodcast || (track.id && String(track.id).startsWith('podcast_'));
|
const isPodcast = track.isPodcast || (track.id && String(track.id).startsWith('podcast_'));
|
||||||
if (track.isLocal || isTracker || isPodcast || (track.audioUrl && !track.isLocal)) continue;
|
if (track.isLocal || isTracker || isPodcast || (track.audioUrl && !track.isLocal)) continue;
|
||||||
try {
|
try {
|
||||||
const streamInfo = await this.api.getStreamUrl(track.id, this.quality);
|
const streamInfo =
|
||||||
|
track.type == 'video'
|
||||||
|
? await this.api.getVideoStreamUrl(track.id)
|
||||||
|
: await this.api.getStreamUrl(track.id, this.quality);
|
||||||
|
|
||||||
if (this.preloadAbortController.signal.aborted) break;
|
if (this.preloadAbortController.signal.aborted) break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue