오류좀봐주세요 ㅠㅠ

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
오류좀봐주세요 ㅠㅠ

QA

오류좀봐주세요 ㅠㅠ

본문

그누보드에서 알림을 사용하고있습니다.
소리지원이 되는데.
pc 에서는 잘됩니다.
근데 모바일에서 접속하면. 알림은 잘오는데. 소리가 안나오는데. 콘솔 열어봤더니.

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

이런오류 가 발생하는데.. 무엇이 문제일까용 ㅠㅠ

이 질문에 댓글 쓰기 :

답변 3

크롬 브라우져 자동재생 정책 위반 입니다.

 

https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_html&wr_id=294516

 

참고하세요

 

muted="muted" 옵션넣으셔야합니다

분명 어제까지는 잘됬는데..
갑자기 안될수도 있나요??ㅠㅠ
(PC.모바일(크롬.사파리,구글) 모두잘됬습니다)
현재 PC 만되고있구요


뮤트 옵션을 어디다가 넣으면될까요..;;

좀 더 구체적으로..

콘솔창 열어서보면..

alarm.js:24 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD



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);
	
}


찾아보니까 정책때문에 그런거 같아요 샌드박스 머시기 있는데 크롬도 정책땜에 막힌거 같아요
이거 참고해보세요
https://cindy-code.tistory.com/8
....
마인드님이 낚아 채쳤군요..ㅋㅋㅋㅋ 그냥 마인드님꺼로..

링크드린거에 댓글에 적혀있는데.

  • <video src="Video (1).mp4" controls autoplay muted="muted"></video>

 

해보세요

답변감사합니다.
PC 는 기존에도 잘 됬었고.. 모바일에서만 안되는 부분이라..
생각해보니. 모바일 은 소리가 안나는게 더 편할듯하네요. 그냥 둬야겠습니닿ㅎ
감사합니다^^

답변을 작성하시기 전에 로그인 해주세요.
전체 74
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT