오류좀봐주세요 ㅠㅠ 채택완료
강낭콩콩이
4년 전
조회 3,226
그누보드에서 알림을 사용하고있습니다.
소리지원이 되는데.
pc 에서는 잘됩니다.
근데 모바일에서 접속하면. 알림은 잘오는데. 소리가 안나오는데. 콘솔 열어봤더니.
Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
이런오류 가 발생하는데.. 무엇이 문제일까용 ㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변 3개
채택된 답변
+20 포인트
4년 전
크롬 브라우져 자동재생 정책 위반 입니다.
https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_html&wr_id=294516
참고하세요
muted="muted" 옵션넣으셔야합니다
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
강낭콩콩이
4년 전
댓글을 작성하려면 로그인이 필요합니다.
4년 전
링크드린거에 댓글에 적혀있는데.
- <video src="Video (1).mp4" controls autoplay muted="muted"></video>
해보세요
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
강낭콩콩이
4년 전
답변감사합니다.
PC 는 기존에도 잘 됬었고.. 모바일에서만 안되는 부분이라..
생각해보니. 모바일 은 소리가 안나는게 더 편할듯하네요. 그냥 둬야겠습니닿ㅎ
감사합니다^^
PC 는 기존에도 잘 됬었고.. 모바일에서만 안되는 부분이라..
생각해보니. 모바일 은 소리가 안나는게 더 편할듯하네요. 그냥 둬야겠습니닿ㅎ
감사합니다^^
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 2개
�
강낭콩콩이
4년 전
콘솔창 열어서보면..
alarm.js:24 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
[code]
function show_alarm(title,content,url,me_id){
if(show_alarm_exist) hide_alarm();
show_alarm_exist=true;
var html = "";
audio.play(); X <- 여기에 X표시되면서 콘솔에 위 내용 글이뜹니다..
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
html += "<div class='notification-icon'><i class='fa fa-envelope'></i></div>";
html += "<div class='notification-close'>";
html += "<button class='close' onclick='hide_alarm()'><i class='fa fa-times fa-lg'></i></button>";
html += "</div>";
html += "<div class='notification-option'><button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(" + me_id + ")'><i class='fa fa-check'></i></button></div>";
html += "<div class='notification-heading'>" + RemoveTag(title) + "</div>";
html += "<div class='notification-content'><a onclick=\"win_memo('" + url + "');\" class=\"cursor\">" + content + "</a></div>";
html += "</div>";
html += "</div>";
$('body').prepend(html);
$('#alarm_layer').fadeIn();
setTimeout(function(){ hide_alarm(); }, 30000);
}
[/code]
alarm.js:24 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
[code]
function show_alarm(title,content,url,me_id){
if(show_alarm_exist) hide_alarm();
show_alarm_exist=true;
var html = "";
audio.play(); X <- 여기에 X표시되면서 콘솔에 위 내용 글이뜹니다..
html = "<div id='alarm_layer' class='wrapper-notification bottom right side' style='display:none'>";
html += "<div class='notification notification-primary notification-msg animated bounceInUp' id='" + me_id + "'>";
html += "<div class='notification-icon'><i class='fa fa-envelope'></i></div>";
html += "<div class='notification-close'>";
html += "<button class='close' onclick='hide_alarm()'><i class='fa fa-times fa-lg'></i></button>";
html += "</div>";
html += "<div class='notification-option'><button class='notification-check' data-toggle='tooltip' data-trigger='hover' data-html='true' data-placement='top' data-original-title='읽음' onclick='set_recv_memo(" + me_id + ")'><i class='fa fa-check'></i></button></div>";
html += "<div class='notification-heading'>" + RemoveTag(title) + "</div>";
html += "<div class='notification-content'><a onclick=\"win_memo('" + url + "');\" class=\"cursor\">" + content + "</a></div>";
html += "</div>";
html += "</div>";
$('body').prepend(html);
$('#alarm_layer').fadeIn();
setTimeout(function(){ hide_alarm(); }, 30000);
}
[/code]
�
릴보이즈
4년 전
찾아보니까 정책때문에 그런거 같아요 샌드박스 머시기 있는데 크롬도 정책땜에 막힌거 같아요
이거 참고해보세요
https://cindy-code.tistory.com/8
....
마인드님이 낚아 채쳤군요..ㅋㅋㅋㅋ 그냥 마인드님꺼로..
이거 참고해보세요
https://cindy-code.tistory.com/8
....
마인드님이 낚아 채쳤군요..ㅋㅋㅋㅋ 그냥 마인드님꺼로..
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
갑자기 안될수도 있나요??ㅠㅠ
(PC.모바일(크롬.사파리,구글) 모두잘됬습니다)
현재 PC 만되고있구요
뮤트 옵션을 어디다가 넣으면될까요..;;