-
-
Save polatengin/04603b1e70d5811f6cfb650527c0310f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML5 video element ile sayfanın arkaplanında video oynatmak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="tr"> | |
<head> | |
<title>Tam ekran video</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<video id="backgroundVideo" controls loop muted> | |
<source src="http://www.enginpolat.com/wp-content/uploads/2016/03/HTML5VideoElement.mp4" type="video/mp4" /> | |
<source src="http://www.enginpolat.com/wp-content/uploads/2016/03/HTML5VideoElement.webm" type="video/webm" /> | |
<source src="http://www.enginpolat.com/wp-content/uploads/2016/03/HTML5VideoElement.ogg" type="video/ogg" /> | |
</video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.onresize = function() { | |
var video = document.querySelector("#backgroundVideo"); | |
video.play(); | |
video.width = window.innerWidth; | |
video.height = window.innerHeight; | |
}; | |
window.onload = function() { window.onresize(); }; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment