Электрон, системное уведомление и воспроизведение звука ⇐ Linux
Электрон, системное уведомление и воспроизведение звука
I have electron setup with my Ubuntu box , however no matter what i try I can't get this to work
ty// Variable to track if notification has been sent let notificationSent = false; // Function to update the countdown function updateCountdown() { // Read the JSON file fs.readFile(jsonFilePath, "utf8", (err, data) => { if (err) { console.error("Error reading file:", err); return; } try { // Parse the JSON data const jsonData = JSON.parse(data); // Get current UTC time let now = new Date(); // Initialize variables to hold current and next activations let currentActivation = null; let nextActivation = null; // Iterate over the gates and lines for (let gate in jsonData) { let lines = jsonData[gate]; for (let line in lines) { let lineTime = new Date(lines[line]); // If the activation time is in the past compared to the current time if (lineTime
Источник: https://stackoverflow.com/questions/781 ... ying-sound
I have electron setup with my Ubuntu box , however no matter what i try I can't get this to work
ty// Variable to track if notification has been sent let notificationSent = false; // Function to update the countdown function updateCountdown() { // Read the JSON file fs.readFile(jsonFilePath, "utf8", (err, data) => { if (err) { console.error("Error reading file:", err); return; } try { // Parse the JSON data const jsonData = JSON.parse(data); // Get current UTC time let now = new Date(); // Initialize variables to hold current and next activations let currentActivation = null; let nextActivation = null; // Iterate over the gates and lines for (let gate in jsonData) { let lines = jsonData[gate]; for (let line in lines) { let lineTime = new Date(lines[line]); // If the activation time is in the past compared to the current time if (lineTime
Источник: https://stackoverflow.com/questions/781 ... ying-sound
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение