Skip to content

Commit

Permalink
Fix default music show
Browse files Browse the repository at this point in the history
  • Loading branch information
miku448 committed Mar 19, 2024
1 parent 3c277db commit c5f35a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/interactor/src/components/interactor/MusicPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const MusicPlayer: React.FC = () => {
const songs = useAppSelector((state) => state.novel.songs)
const scene = useAppSelector(selectCurrentScene)
const audioRef = useRef<HTMLAudioElement>(null)
const _src = songs.find((s) => s.id === scene?.musicId)?.source
const _src =
songs.find((s) => s.id === scene?.musicId)?.source || scene?.musicId
const src = _src ? assetLinkLoader(_src) : ''

const volume = enabled ? _volume : 0
Expand Down

0 comments on commit c5f35a2

Please sign in to comment.