fixed audio window
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user