mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-18 01:14:22 +02:00
refactor api controller to internalize server fetch
This commit is contained in:
@@ -39,22 +39,18 @@ export const useMediaSession = ({
|
||||
}
|
||||
|
||||
mediaSession.setActionHandler('nexttrack', () => {
|
||||
console.log('nexttrack');
|
||||
handleNextTrack();
|
||||
});
|
||||
|
||||
mediaSession.setActionHandler('pause', () => {
|
||||
console.log('pause');
|
||||
handlePause();
|
||||
});
|
||||
|
||||
mediaSession.setActionHandler('play', () => {
|
||||
console.log('play');
|
||||
handlePlay();
|
||||
});
|
||||
|
||||
mediaSession.setActionHandler('previoustrack', () => {
|
||||
console.log('previoustrack');
|
||||
handlePrevTrack();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user