I created a function that starts an audio notification when the page footer is opened. Works perfectly in desktop versions but does not work in mobile versions. Do you have any advice on how to solve? Thanks.
/**
* Play Notification Sound
*/
function custom_um_notification_feed_sound() {
$myAudioFile = "<audio src='https://www.example.com/fischio.mp3' autoplay></audio>";
echo $myAudioFile;
}
add_action( 'wp_footer', 'custom_um_notification_feed_sound', 9999 );
/*