32 lines
952 B
PHP
32 lines
952 B
PHP
{{-- <div>
|
|
{{-- Do your work, then step back.
|
|
</div> --}}
|
|
|
|
<div>
|
|
@push('scripts')
|
|
<script>
|
|
window.addEventListener('play-notification-sound', () => {
|
|
const audio = new Audio('/sounds/click.mp3');
|
|
audio.play().catch(() => {
|
|
console.log("Sound blocked until user interacts with the page");
|
|
});
|
|
});
|
|
|
|
window.addEventListener('play-warn-sound', () => {
|
|
const audio = new Audio('/sounds/warning.mp3');
|
|
audio.play().catch(() => {
|
|
console.log("Sound blocked until user interacts with the page");
|
|
});
|
|
});
|
|
|
|
window.addEventListener('play-beep-sound', () => {
|
|
const audio = new Audio('/sounds/scanner-beep.mp3');
|
|
audio.play().catch(() => {
|
|
console.log("Sound blocked until user interacts with the page");
|
|
});
|
|
});
|
|
</script>
|
|
@endpush
|
|
</div>
|
|
|