mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-09 19:51:36 +02:00
Fix YouTube track live attribute (#574)
This commit is contained in:
parent
667894e829
commit
df803b8c76
3 changed files with 4 additions and 2 deletions
|
@ -193,7 +193,7 @@ export default class {
|
|||
offset: 0,
|
||||
url,
|
||||
playlist: queuedPlaylist ?? null,
|
||||
isLive: false,
|
||||
isLive: (video as YoutubeVideo).snippet.liveBroadcastContent === 'live',
|
||||
thumbnailUrl: video.snippet.thumbnails.medium.url,
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const getPlayerUI = (player: Player) => {
|
|||
const position = player.getPosition();
|
||||
const button = player.status === STATUS.PLAYING ? '⏹️' : '▶️';
|
||||
const progressBar = getProgressBar(15, position / song.length);
|
||||
const elapsedTime = `${prettyTime(position)}/${song.isLive ? 'live' : prettyTime(song.length)}`;
|
||||
const elapsedTime = song.isLive ? 'live' : `${prettyTime(position)}/${prettyTime(song.length)}`;
|
||||
|
||||
return `${button} ${progressBar} \`[${elapsedTime}]\` 🔉`;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue