Skip to content

Enable alarm sound autoplay on Safari#29

Merged
brichards64 merged 1 commit intoToolDAQ:masterfrom
ekumachidi:ce-play-alarm-on-safari
Dec 9, 2024
Merged

Enable alarm sound autoplay on Safari#29
brichards64 merged 1 commit intoToolDAQ:masterfrom
ekumachidi:ce-play-alarm-on-safari

Conversation

@ekumachidi
Copy link
Contributor

@ekumachidi ekumachidi commented Oct 22, 2024

This fix:

  • Adds jump.mp3 because the .ogg failed on Safari tests
  • Updated the alarm_footer.js file to refactor the alarm sound handling and autoplay permission logic.
  • Added a new function checkAutoplayPermission() to check if autoplay for audio is allowed.
  • Added a new function showEnableAudioButton() to display a button to enable sound if autoplay is blocked.
  • Modified the TestAlarm() function to play the alarm sound using the playAlarmSound() function.
  • Updated the CheckAlarms() function to use the playAlarmSound() function when an alarm is triggered.
  • Added a new function playAlarmSound() to play the alarm sound with fallback for Safari.
  • Updated the footer.html file to include a hidden button to enable sound and a message for permission status.

@brichards64
Copy link
Contributor

can you move this to the same files in html-common

@ekumachidi ekumachidi force-pushed the ce-play-alarm-on-safari branch from 77ca876 to 649996c Compare October 24, 2024 07:32
This fix
- Adds a jump.mp3 because the `.ogg` failed on Safari tests
- Updated the alarm_footer.js file to refactor the alarm sound handling and autoplay permission logic.
- Added a new function checkAutoplayPermission() to check if autoplay for audio is allowed.
- Added a new function showEnableAudioButton() to display a button to enable sound if autoplay is blocked.
- Modified the TestAlarm() function to play the alarm sound using the playAlarmSound() function.
- Updated the CheckAlarms() function to use the playAlarmSound() function when an alarm is triggered.
- Added a new function playAlarmSound() to play the alarm sound with fallback for Safari.
- Updated the footer.html file to include a hidden button to enable sound and a message for permission status.
@ekumachidi ekumachidi force-pushed the ce-play-alarm-on-safari branch from 649996c to 877b8d6 Compare October 24, 2024 13:34
@ekumachidi
Copy link
Contributor Author

@brichards64 it is done

@brichards64 brichards64 merged commit 39a28d3 into ToolDAQ:master Dec 9, 2024
@ekumachidi ekumachidi deleted the ce-play-alarm-on-safari branch December 11, 2024 11:44
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

Successfully merging this pull request may close these issues.

2 participants