error is due to the new feature of chrome, which basically means that developers cannot use their permissions to cause noise interference to users, and users need to interact with audio/video
to load the page for the first time
The requirements are as follows:
refresh the alarm list in real time to ensure the user gets the latest alarm message. When there is a new alarm message, sound the alarm bell
solution
enable alarm bell to prompt users when they first enter the page
let audioPlay = document.getElementById('myaudio')
audioPlay.play()
setTimeout(() => {
audioPlay.pause()
audioPlay.load()
}, 10)
click to interact with audio for the first time, set 10 milliseconds and the user will not hear the bell. Set the alarm time to
when using again
Read More:
- Solve the audio control and report domexception: the play() request was interrupted by a call to pause in the chrome console
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- JS error: permission denied to access property ‘document’— document.domain -The same source strategy of JavaScript
- Error (12153): Can‘t elaborate top-level user hierarchy
- Uncaught domexception: failed to read the ‘contentdocument’ property from ‘htmliframeelement’
- Add Samba user prompt failed to add entry for user
- Easywasmlayer reports an error uncaught (in promise) domexception when playing a video
- Add samba user prompt Failed to add entry for user.
- Remove video with video byte 0, uncaught (in promise) domexception: failed to load because no supported source was f
- Adobe audit cannot play solutions
- User CF itemcf collaborative filtering algorithm based on user and item
- The seahorse play simulator failed to start, start machine failed! error code = 3 and error code = 21
- The Spring problem Failed to read Schema Document
- How to root Motorola G6 play
- Vscode cannot write user settings. Open user settings, clear errors or warnings, and then type again
- VS2008 comes with crystal reports: Failed to Save Document
- Qaudiooutput play sound
- rmd to pdf error: pandoc document conversion failed with error 43
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- “Failed to find entry for user…” appears when Linux uses samba