This commit is contained in:
Kate Hudson 2012-06-04 13:50:16 -04:00
Родитель a074abfa79
Коммит 54580e7dca
2 изменённых файлов: 3 добавлений и 22 удалений

Просмотреть файл

@ -22,13 +22,9 @@
document.addEventListener( 'DOMContentLoaded', function() {
var paused = true,
popcorn,
popcorn2,
pocporn3;
popcorn;
popcorn = Popcorn.youtube( '#video', 'http://www.youtube.com/watch?v=nfGV32RNkhw&autoplay=0' );
popcorn2 = Popcorn.youtube( '#video2', 'http://www.youtube.com/watch?v=M2Nn5hY5QzE' );
popcorn3 = Popcorn.youtube( '#video3', 'http://www.youtube.com/watch?v=nfGV32RNkhw&autoplay=0' );
popcorn = popcorn
.footnote({
@ -138,10 +134,6 @@
}, false);
}, false );
</script>
<style>
#video2 { width: 1100px; border: 1px solid red; }
#video3 { width: 100px; border: 1px solid blue; }
</style>
</head>
<body>
<div>
@ -206,9 +198,5 @@
<strong>Web Page Area</strong><br />
</div>
</div>
<p>This video should be 1100px wide and resize to fit the entire container:</p>
<div id="video2"></div><br />
<p>This video should be 640px wide, expanding out of its container:</p>
<div id="video3"></div><br />
</body>
</html>

Просмотреть файл

@ -221,15 +221,8 @@ Popcorn.player( "youtube", {
// setting youtube player's height and width, min 640 x 390,
// anything smaller, and the player reports incorrect states.
width = media.offsetWidth && media.offsetWidth >= 640 ? "" + media.offsetWidth : "640";
relativeHeight = +( width/16 * 9 );
if(
media.offsetHeight && media.style.height >= 390 ) { height = media.offsetHeight;
} else if ( relativeHeight && relativeHeight >= 390 ) {
height = relativeHeight;
} else {
height = 390;
}
height = media.clientHeight >= 390 ? "" + media.clientHeight : "390";
width = media.clientWidth >= 640 ? "" + media.clientWidth : "640";
options.youtubeObject = new YT.Player( container.id, {
height: height,