d sent");
                        } catch (err) {
                            console.error("[OBS] Error saving replay buffer:", err);
                        }
                    } else {
                        console.warn("[OBS] API not available");
                    }
                    break;
                    
                default:
                    console.warn("Unknown action type received:", payload.actionType);
            }
        }

        // Function to play media wi