Added audio in panel box inspection stock page
This commit is contained in:
@@ -6,4 +6,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<audio id="error-sound" src="{{ asset('sounds/scan_serial_tamil.mp3') }}" preload="auto"></audio>
|
||||
|
||||
<script>
|
||||
document.addEventListener('livewire:init', () => {
|
||||
Livewire.on('play-error-sound', () => {
|
||||
const audio = document.getElementById('error-sound');
|
||||
|
||||
if (audio) {
|
||||
audio.currentTime = 0;
|
||||
audio.play().catch(error => {
|
||||
console.log('Could not play error sound:', error);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</x-filament-panels::page>
|
||||
|
||||
Reference in New Issue
Block a user