[이윰] 최신 브라우저에서 푸시 사운드 문제 해결하기
페이지 정보
shadow2fox
2,496
2018.07.20 04:07:15
짧은주소
-
https://yadolee.com/tip/571 주소복사
본문
최신 브라우저에서 푸시 사운드 문제 해결하기
언제부터였는지 모르겠으나 이윰빌더의 푸시(push) 사운드가 최신 브라우저(크롬, 파이어폭스, 오페라 등)에서 작동되고 있지 않다는 걸 알았는데 필요성을 느끼지 못하다가 모바일에선 상당히 짜증나는 하단 팝업을 일으켜서 수정해 보았다.
그누보드5/eyoom/core/member/push_alarm.php 를 열어 echo "<embed src='{$sound}'></embed>"; 를 검색하고 수정한다.
수정 전
그누보드5/eyoom/core/member/push_alarm.php 를 열어 echo "<embed src='{$sound}'></embed>"; 를 검색하고 수정한다.
수정 전
if(file_exists($alarm_sound)) {
$sound = EYOOM_MISC_URL.'/sound/'.$eyoom['push_sound'];
echo "<embed src='{$sound}'></embed>";
}
exit;
수정 후
if(file_exists($alarm_sound)) {
$sound = EYOOM_MISC_URL.'/sound/'.$eyoom['push_sound'];
//echo "<embed src='{$sound}'></embed>";
echo "<audio src='{$sound}' autoplay></audio>";
}
exit;
상기 수정으로 피시상에선 기존처럼 푸시(push) 사운드가 올바르게 작동하고 모바일에선 autoplay가 허용되지 않기 때문(데이타 사용 보호 목적)에 무시(하단 팝업이 뜨지 않음)되게 된다.추천인
레벨 149
경험치 3,343,659
Progress Bar 80.23%
- 가입일 : 2015-03-10 12:21:44
- 서명 : 인간에게 가장 큰 선물은
자기 자신에게 기회를 주는 것이다.
- 크리스 가드너, Chris Gardner -
- 자기소개 : There's never a shortcut to happiness.



댓글
첫 번째 댓글을 남겨 주세요