Enable autoPlay in React Player
This commit is contained in:
parent
cf692140a9
commit
3a9324c6ef
1 changed files with 2 additions and 3 deletions
|
|
@ -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),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue