Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playAlarm #38

Open
ozzylamberth opened this issue Jun 23, 2022 · 1 comment
Open

playAlarm #38

ozzylamberth opened this issue Jun 23, 2022 · 1 comment

Comments

@ozzylamberth
Copy link

I have a doubt with
playAlarm = (undefined === parameters.playAlarm ? false : parameters.playAlarm),
alarmSound = (undefined === parameters.alarmSound ? false : parameters.alarmSound),

It doesn't run, I already have added alarm.mp3 in the js folder as indicated by the path.

// Create audio tag for alarm sound
var audioElement;
if (playAlarm && alarmSound !== false) {
var audioElement = doc.createElement('audio');
//audioElement.setAttribute('src', alarmSound);
audioElement.setAttribute('src', 'js/alarm.mp3');
audioElement.setAttribute('preload', 'auto');
}

@mcrossley
Copy link
Collaborator

mcrossley commented Jun 23, 2022

Modern browsers now prevent pages playing unsolicited sounds, so I think that functionality is now dead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants