fixed audio window

This commit is contained in:
DBChoco
2023-08-27 16:53:07 +02:00
parent 4d18a12949
commit 6710709beb
4 changed files with 2491 additions and 2495 deletions

View File

@@ -165,12 +165,13 @@ function createWindow () {
//Create hidden mediaPlayer
mediaWindow = new BrowserWindow({
show: false,
show: true,
webPreferences: {
nodeIntegration: false, // is default value after Electron v5
//nodeIntegration: false, // is default value after Electron v5
contextIsolation: true, // protect against prototype pollution
enableRemoteModule: false, // turn off remote
preload: path.join(__dirname, 'preload.js'),
sandbox: false
}
});

View File

@@ -418,11 +418,11 @@ function msToTime(duration){ //https://stackoverflow.com/questions/19700283/how-
hours = Math.floor((duration / (1000 * 60 * 60)) % 24);
if (seconds == 60){
minutes ++;
seconds = 00;
seconds = 0;
}
if (minutes == 60){
hours ++;
minutes = 00;
minutes = 0;
}
var res = [hours, minutes, seconds]
return res;

View File

@@ -1,6 +1,6 @@
var athan = new Audio('../../ressources/audio/azan3.mp3');
var athan = new Audio('../../ressources/audio/Adhan - Ahmed Al-Nufais.mp3');
var dua = new Audio('../../ressources/audio/dua.mp3');
var playDua = true;
var interval;
@@ -30,6 +30,7 @@ function setUpHandlers(){
athan = new Audio(msg.adhan.path);
setUpAdhanListeners()
athan.play();
console.log("SALAMAMAMAM")
})
window.api.handle('playFajr', msg => {

4974
yarn.lock

File diff suppressed because it is too large Load Diff