유튜브 iframe 백그라운드 재생 관련 질문입니다~

유튜브 iframe 백그라운드 재생 관련 질문입니다~

QA

유튜브 iframe 백그라운드 재생 관련 질문입니다~

본문

안녕하세요.

 

 

<script>

  // 2. This code loads the IFrame Player API code asynchronously.

  var tag = document.createElement('script');

 

  tag.src = "https://www.youtube.com/iframe_api";

  var firstScriptTag = document.getElementsByTagName('script')[0];

  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

 

  var section = {

    start: 0, // 반복 시작 시간(초)

    end: 236 // 반복 종료 시간(초)

  };

 

  // 3. This function creates an <iframe> (and YouTube player)

  //    after the API code downloads.

  var player;


 

  function onYouTubeIframeAPIReady() {

    player = new YT.Player(

      'player', {

        playerVars: {

          'background': 1,

          'frameborder': 0,

          'autoplay': 1,

          'controls': 0,

          'mute': 1

        },

        videoId: '영상주소', 

        events: {

          'onReady': onPlayerReady,

          'onStateChange': onPlayerStateChange

        }

      }

    );

  }

 

  function onPlayerReady(event) {

    player.seekTo(section.start);

    player.playVideo();

  }

 

  function onPlayerStateChange(event) {

    if (event.data == YT.PlayerState.PLAYING) {

      var duration = section.end - section.start;

      setTimeout(restartVideoSection, duration * 1000);

    }

  }

 

  function restartVideoSection() {

    player.seekTo(section.start);

  }

</script>

 

위와같이 유튜브 재생소스를 사용중인데요,

 

백그라운드에서 재생이 되는데 문제는 시작할 때

왼쪽 상단에 유튜브명?(유튜버이름), 오른쪽상단에 공유버튼, 오른쪽하단에 유튜브 로고가 들어가있다가 1~2초후에 사라집니다.

 

아예 안뜨게 막고싶습니다만 방법이있을까요?

이 질문에 댓글 쓰기 :

답변 1

유튜브 정책상 안됩니다. 그리고 그걸 지울 수 있는 꼼 수 가 있다해도 다른 유튜브 동영상을 사이트 동영상인 것처럼 재생하면 저작권 위반으로 심각한 결과를 초례할 수 있어요. 요즘은 아무도 유튜브 동영상에 대한 거부 반응이 없으니 그냥 이용하시면 될 듯 한데요. 

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

회원로그인

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