Skip to content

Commit

Permalink
fixed audio window
Browse files Browse the repository at this point in the history
  • Loading branch information
DBChoco committed Aug 27, 2023
1 parent 4d18a12 commit 6710709
Show file tree
Hide file tree
Showing 4 changed files with 3,058 additions and 3,062 deletions.
5 changes: 3 additions & 2 deletions src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/main/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/mediaPlayer/renderer.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -30,6 +30,7 @@ function setUpHandlers(){
athan = new Audio(msg.adhan.path);
setUpAdhanListeners()
athan.play();
console.log("SALAMAMAMAM")
})

window.api.handle('playFajr', msg => {
Expand Down
Loading

0 comments on commit 6710709

Please sign in to comment.