Skip to content

Commit

Permalink
Removes sukkot announcement as the feast comes to an end
Browse files Browse the repository at this point in the history
  • Loading branch information
JudahGabriel committed Oct 6, 2023
1 parent 94099e4 commit c2ead13
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Chavah.NetCore/wwwroot/js/Services/AdAnnouncerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@

playAdAnnouncement() {
// Sukkot 2023 ad: play it every even hour;
let fileName: string;
if (new Date().getHours() % 2 === 0) {
fileName = "ad6x.mp3";
} else {
const announcementNumbers = [1, 2, 3, 4, 5,6];
fileName = "ad" + announcementNumbers[Math.floor(Math.random() * announcementNumbers.length)] + "x.mp3";
}
const announcementNumbers = [1, 2, 3, 4, 5];
const fileName = "ad" + announcementNumbers[Math.round(Math.random() * announcementNumbers.length)] + "x.mp3";

const songUrl = `${this.homeViewModel.soundEffects}/${fileName}`;
this.audioPlayer.playNewUri(songUrl);
Expand Down

0 comments on commit c2ead13

Please sign in to comment.