hocam merhaba;

ben şu şekilde kullanıyorum :


bu html kodu :










bu css kodu :


* {margin: 0; padding: 0}
.bgVideo { position: fixed; z-index: -99; width: 100%; height: 100%; }

.bgVideo iframe { width: 120%!important; height: 120%!important; position: fixed; margin-left: -10%; margin-top: -10%; }
.siteContiner { position: absolute; width: 100%; height: auto; top: 0; left: 0; min-height: 100%!important; }



Buradan Test Edebilirsiniz.

iyi çalışmalar


Ek Olarak :




Api İle Yapılmış versiyonu :








<script></script>
<script>
function onYouTubeIframeAPIReady() {
var player;
player = new YT.Player('bgVideo', {
videoId: 'VYCOg-yglNM', // YouTube Video ID
width: '100', // Player width (in px)
height: '100', // Player height (in px)
playerVars: {
autoplay: 1, // Auto-play the video on load
controls: 0, // Show pause/play buttons in player
showinfo: 0, // Hide the video title
modestbranding: 1, // Hide the Youtube Logo
loop: 1, // Run the video in a loop
fs: 0, // Hide the full screen button
cc_load_policty: 0, // Hide closed captions
iv_load_policy: 3, // Hide the Video Annotations
autohide: 0 // Hide video controls when playing
},
events: {
onReady: function(e) {
// e.target.mute(); <- bu videonun sesini kapatmak için..
}
}
});
}
</script>


bu da gerekli css :


#bgVideo {
position: fixed; z-index: -99; width: 120%!important; height: 120%!important; margin-left: -10%; margin-top: -10%;
}



buda api test adresi