안녕하세요 팝업창에서 유트브 영상 정지하려면?

안녕하세요 팝업창에서 유트브 영상 정지하려면?

QA

안녕하세요 팝업창에서 유트브 영상 정지하려면?

답변 1

본문

안녕하세요 현재 이미지를 클릭하면 유트브팝업이 뜨도록 했는데

문제는 닫아도 영상 소리가 안꺼져서..검색으로 이리저리 적용하다가 안돼서

도움을 구합니다!

자바스크립트는 아래 처럼 되어 있는데요

이부분에 추가해서 해결 할수 있는 방법이 있을까요?

 

<script>

    ;(function($) {

        // DOM Ready

       $(function() {

           // Binding a click event

           // From jQuery v.1.7.0 use .on() instead of .bind()

           $('#my-button').bind('click', function(e) {

       var self = $(this) //button

       , content = $('.content');

       $('element_to_pop_up').bPopup({

           onOpen: function() {

               content.html(self.data('bpopup') || '');

           },

           onClose: function() {

               content.empty();

           }

       });

               // Prevents the default action to be triggered.

               e.preventDefault();

               // Triggering bPopup when click event is fired

               $('#element_to_pop_up').bPopup();

           });

       });

   })(jQuery);

</script>

이 질문에 댓글 쓰기 :

답변 1

           onClose: function() {

               content.empty();

           }

이부분을

 

           onClose: function() {

           content.empty();

          document.getElementById('iframeid값').contentWindow.postMessage( '{"event":"command", "func":"pauseVideo", "args":""}', '*');

           }

이렇게 해보실레요?

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 59,518
© SIRSOFT
현재 페이지 제일 처음으로