В итоге я нашел решение благодаря @patrick Hund, который смог понять тот факт, что большинство браузеров ограничивает автоматическое воспроизведение звуков и видео, что приводит к исключению из обещаний, я решил это, создав кнопку, которая скрыта и нажатавсякий раз, когда приходит новое уведомление, вот мой код Js
function NotificationComment(cat,place){
clearInterval(notify);
var url = $("#notification").val();
var val = $("#"+cat).val();
$.get(url,{type:cat,prev:val},function (data) {
arrayData = JSON.parse(data);
$('#'+place).html(' '+arrayData.count+' ');
$("#"+cat).val(arrayData.count);
if(arrayData.sound==1){
$("#player")[0].click();
notify = setInterval(function () {
NotificationComment('G','commentNot');
}, 2000);
}else{
notify = setInterval(function () {
NotificationComment('G','commentNot');
}, 2000);
}
});
}
if($("#auth").val()==1) {
notify = setInterval(function () {
NotificationComment('G','commentNot');
}, 2000);
}
HTML
<audio id="myAudio">
<source src="{{url('assets2/audio/definite.mp3')}}">
</audio>
<button id="player" onclick="play()">Play</button>
<script>
var x = document.getElementById('myAudio');
function play() {
x.play();
}
</script>
Спасибо, ребята