audioplayer-fix

This commit is contained in:
Untone 2024-01-17 15:00:57 +03:00
parent 1eac709895
commit 63f92c466c
2 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@ type Props = {
onChangeMediaIndex?: (direction: 'up' | 'down', index) => void onChangeMediaIndex?: (direction: 'up' | 'down', index) => void
} }
const getFormattedTime = (point) => new Date(point * 1000).toISOString().slice(14, -5) const getFormattedTime = (point: number) => new Date(point * 1000).toISOString().slice(14, -5)
export const AudioPlayer = (props: Props) => { export const AudioPlayer = (props: Props) => {
const audioRef: { current: HTMLAudioElement } = { current: null } const audioRef: { current: HTMLAudioElement } = { current: null }

View File

@ -54,8 +54,10 @@ export const PlayerPlaylist = (props: Props) => {
when={activeEditIndex() === index() && props.editorMode} when={activeEditIndex() === index() && props.editorMode}
fallback={ fallback={
<> <>
<div class={styles.title}>{mi.title || t('Song title')}</div> <div class={styles.title}>{mi.title || index()}</div>
<div class={styles.artist}>{mi.artist || t('Artist')}</div> <Show when={mi.artist}>
<div class={styles.artist}>{mi.artist}</div>
</Show>
</> </>
} }
> >