Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

229
Views
Javascript Refresh page audio play not working

Hi this my simple project

window.addEventListener("load", () => {
  loadIndexedDB(1, callBackData);
  loadNotesIndexedDB(callBackNotes);
});

let playSound = () => {
  const audio = new Audio();
  audio.src = "./audio/audio.wav";
  audio.play();
  audio.load();
};

let callBackNotes = (note) => {
  const notes = [];
  notes.push(note);
  notes.forEach((el) => {
    $(".note_empty").addClass("note_activ");
    let dateForDateTimeLocal = dateFormat();
    let alarmColor;
    if (el.alarm != null && dateForDateTimeLocal < el.alarm) {
      alarmColor = "#fff";
    } else if (el.alarm != null && dateForDateTimeLocal >= el.alarm) {
      alarmColor = "#ff1c1c";
      playSound();
    } else {
      alarmColor = "#fff";
    }
    $(".add_note_container").append(
      appendHtml(
        el.noteBackColor,
        el.noteTextColor,
        el.note,
        el.projectType,
        el.time,
        el.id,
        el.alarm,
        alarmColor
      )
    );
  });
};

My project localhost start audio play working but refresh window or reload not working audio.play I am dont understand what the problem Please help me Thanks

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!