레이어팝업 동영상게시판
본문
안녕하세요
음악감상용 유투브 게시판을 만드는 중인데 음악감상용이다보니 클릭하면 동영상레이어가 뜨면서 자동재생이 되도록 했습니다
익스에서는 문제없이 작동하는데 크롬에서는 게시판에 있는 모든 글의 동영상이 게시판 열리자마자 자동재생되네요
해결방법이 없을까요?
코드는 여러가지 게시판 참고했습니다.
<script>
</script>
$(".popups").hide(); //2개 중복을 막기 위한 숨기기
$("#notice_up"+i).show(); //보이기
}
function notice_down(){
$(".popups").hide("blind", {direction: "horizontal"}, 1); //숨기기
}
</script>
<!--팝업 뜨는 부분-->
$v = "";
$daumpot_limit = "";
$mov_link = "";
$img_content = "";
$mov_link = $list[$i]['wr_1'];
$youtube_url = parse_url($mov_link);
parse_str($youtube_url['query']);
?>
<div id="notice_up<?=$i?>" class="popups" style="position:absolute; top:50%; left:50%; width:680px; height:450px; margin-top:-225px; margin-left:-340px; background-color:#000; border:1px solid #e9e9e9; display:none; cursor:pointer; color:#fff;" onclick="notice_down();" title="닫기">
<div style="text-align:center;font-size:;width:660px;height:30px;padding:20px 10px 0px 10px;">
<!--<marquee scrollamount="4" direction="left" behavior="scroll" width="300px"></marquee>--><?php echo $list[$i]['subject'] ?>
</div>
<div style="text-align:center;width:650px;height:370px;padding:15px;overflow-y:auto;">
<?if ($list[$i]['wr_1']!="") {?><iframe width="640" height="360" src="//www.youtube.com/embed/<?php echo $v; ?>?feature=player_detailpage&vq=hd720&autoplay=1" frameborder="0" allowfullscreen></iframe>
<?}else{?>동영상이 등록되어 있지 않습니다.<?}?>
</div>
</div>
<!--팝업 뜨는 부분-->
<?if ($list[$i]['wr_1']!="") {?> <a href="javascript:void(0);" onclick="javascript:notice_up(<?=$i?>);"><img src="<?=$board_skin_url?>/img/icon_play.gif" border="0" title="재생" alt="재생"></a><?}?>