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