added time save raya
This commit is contained in:
parent
3c82897001
commit
f3eba04a2e
@ -5,21 +5,34 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Raya and the Last Dragon</title>
|
||||
<style>
|
||||
#video{
|
||||
body{
|
||||
background-color: #121212;
|
||||
}
|
||||
#video1{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
margin: auto;
|
||||
height:100vh;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<divdiv id="video">
|
||||
<video controls controlslist="nodownload" poster="https://s.abcnews.com/images/GMA/211026_gma_digital_rayatrailer_hpMain_16x9_992.jpg" src="raya.mp4" type="video/mp4">
|
||||
<div id="video1">
|
||||
<video id="video" controls controlslist="nodownload" poster="https://s.abcnews.com/images/GMA/211026_gma_digital_rayatrailer_hpMain_16x9_992.jpg" src="raya.mp4" type="video/mp4">
|
||||
|
||||
Your browser doesn't support embedded video. Sorry.
|
||||
|
||||
</video>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
document.getElementById('video').addEventListener('loadedmetadata', function() {
|
||||
this.currentTime = localStorage.getItem("time") ;
|
||||
}, false);
|
||||
// document.getElementById("video").currentTime = 50;
|
||||
setInterval(function(){ localStorage.setItem("time", document.getElementById("video").currentTime); console.log(document.getElementById("video").currentTime) }, 10000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user