Enable autoPlay in React Player
This commit is contained in:
@@ -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),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user