2017-03-23 13 views
0

こんにちは、私はすでに設定したdivの背景に私のページのビデオを設定したいので、私はこのhtmlを持っています:Youtubeビデオapiビデオが表示されない

<div class="embed-responsive embed-responsive-16by9" id="video"> 

</div> 

javascriptの

$(document).ready(function() { 
    $('#video').YTPlayer({ 
     fitToBackground: true, 
     videoId: 'LSmgKRx5pBo', 
     playerVars: { 
      modestbranding: 0, 
      autoplay: 1, 
      controls: 1, 
      showinfo: 0, 
      branding: 0, 
      rel: 0, 
      autohide: 0, 
      start: 10 
     } 
    }); 
}) 

これは私が、私は、任意のコンソールエラーを取得しないAPIを使用していますからlinkですが、私は間違って何をやっています?

答えて

0

Hereは、映像上のいくつかのテキストとボタンで作業フィドルです:

$(document).ready(function() { 
 
    $('#video').YTPlayer({ 
 
    fitToBackground: true, 
 
    videoId: 'LSmgKRx5pBo', 
 
    playerVars: { 
 
     modestbranding: 0, 
 
     autoplay: 1, 
 
     controls: 1, 
 
     showinfo: 0, 
 
     branding: 0, 
 
     rel: 0, 
 
     autohide: 0, 
 
     start: 10 
 
    } 
 
    }); 
 
})
#video { 
 
    position: relative; 
 
    background: transparent; 
 
} 
 

 
.ytplayer-container { 
 
    position: absolute; 
 
    top: 0; 
 
    z-index: -1; 
 
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" /> 
 
<script src="https://cdn.rawgit.com/rochestb/jQuery.YoutubeBackground/dbdfa723/src/jquery.youtubebackground.js"></script> 
 
<div class="embed-responsive embed-responsive-16by9" id="video"> 
 
    <p>Some text</p> 
 
    <input type="submit" value="some button" /> 
 
</div>

関連する問題