Enable autoPlay in React Player

This commit is contained in:
Deluan
2020-06-19 16:32:54 -04:00
parent cf692140a9
commit 3a9324c6ef
+2 -3
View File
@@ -28,7 +28,7 @@ const Player = () => {
to={`/album/${audioInfo.albumId}/show`} to={`/album/${audioInfo.albumId}/show`}
className={classes.audioTitle} className={classes.audioTitle}
> >
{`${audioInfo.name} - ${audioInfo.singer}`} {audioInfo.name ? `${audioInfo.name} - ${audioInfo.singer}` : ''}
</Link> </Link>
) )
@@ -36,7 +36,7 @@ const Player = () => {
theme: playerTheme, theme: playerTheme,
bounds: 'body', bounds: 'body',
mode: 'full', mode: 'full',
autoPlay: false, autoPlay: true,
preload: true, preload: true,
autoPlayInitLoadPlayList: true, autoPlayInitLoadPlayList: true,
loadAudioErrorPlayNext: false, loadAudioErrorPlayNext: false,
@@ -83,7 +83,6 @@ const Player = () => {
const addQueueToOptions = (queue) => { const addQueueToOptions = (queue) => {
return { return {
...defaultOptions, ...defaultOptions,
autoPlay: false,
clearPriorAudioLists: queue.clear, clearPriorAudioLists: queue.clear,
audioLists: queue.queue.map((item) => item), audioLists: queue.queue.map((item) => item),
} }