Audio tag muted autoplay does not work

153 views
Skip to first unread message

Hugo Aguirre

unread,
Dec 15, 2022, 6:42:33 PM12/15/22
to Chromium HTML5
Hello everyone,

I am automating some code to test some audio content that we have using the audio tag. I am using the muted autoplay on the audio tag in order to comply with the autoplay rules. This may be silly for browsing but not for automation.


But these rules are not applied to the audio tag. I get the following error. 

: play() failed because the user didn't interact with the document first.

For internal compelling reasons I can't use the video tag (which does work) to test the content. I do need the audio tag to play so I can do a variety of tests.

I'd like to understand if there is any way around it, even if it is to use some flag on Chrome or anything I can do as I can set this up in a close environment so automation is possible without human interaction.

Thanks,

Hugo
Reply all
Reply to author
Forward
0 new messages