fix flic handler functions
This commit is contained in:
@@ -166,16 +166,7 @@ export function handleFlicAction(action, buttonId, timestamp) {
|
||||
if (handler && typeof handler === 'function') {
|
||||
console.log(`[PushFlic] Executing handler for ${action}`);
|
||||
// Execute the handler registered in app.js
|
||||
switch(action) {
|
||||
case FLIC_ACTIONS.SINGLE_CLICK:
|
||||
nextPlayer();
|
||||
break;
|
||||
case FLIC_ACTIONS.DOUBLE_CLICK:
|
||||
previousPlayer();
|
||||
break;
|
||||
case FLIC_ACTIONS.HOLD:
|
||||
togglePauseResume();
|
||||
}
|
||||
handler(); // Use the handler function directly instead of hardcoded function calls
|
||||
} else {
|
||||
console.warn(`[PushFlic] No handler registered for action: ${action}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user