Enable autoPlay in React Player

This commit is contained in:
Deluan 2020-06-19 16:32:54 -04:00
parent cf692140a9
commit 3a9324c6ef
1 changed files with 2 additions and 3 deletions

View File

@ -28,7 +28,7 @@ const Player = () => {
to={`/album/${audioInfo.albumId}/show`}
className={classes.audioTitle}
>
{`${audioInfo.name} - ${audioInfo.singer}`}
{audioInfo.name ? `${audioInfo.name} - ${audioInfo.singer}` : ''}
</Link>
)
@ -36,7 +36,7 @@ const Player = () => {
theme: playerTheme,
bounds: 'body',
mode: 'full',
autoPlay: false,
autoPlay: true,
preload: true,
autoPlayInitLoadPlayList: true,
loadAudioErrorPlayNext: false,
@ -83,7 +83,6 @@ const Player = () => {
const addQueueToOptions = (queue) => {
return {
...defaultOptions,
autoPlay: false,
clearPriorAudioLists: queue.clear,
audioLists: queue.queue.map((item) => item),
}