|
@@ -237,6 +237,7 @@ export const getActiveMidiId = () => {
|
|
|
* @param val IMode
|
|
|
*/
|
|
|
export const changeMode = async (val: IMode, type?: string | undefined) => {
|
|
|
+
|
|
|
const cm: IMode = val === 'background' ? 'music' : 'background'
|
|
|
|
|
|
if (detailState.activeDetail.isAppPlay) {
|
|
@@ -272,6 +273,10 @@ export const changeMode = async (val: IMode, type?: string | undefined) => {
|
|
|
|
|
|
|
|
|
state.mode = val
|
|
|
+
|
|
|
+ if (!state.songs.background) {
|
|
|
+ state.mode = 'music'
|
|
|
+ }
|
|
|
if (type === 'all') {
|
|
|
state.audiosInstance?.setMute(true, state.songs[cm])
|
|
|
state.audiosInstance?.setMute(true, state.songs[val])
|