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">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Raya and the Last Dragon</title>
|
<title>Raya and the Last Dragon</title>
|
||||||
<style>
|
<style>
|
||||||
#video{
|
body{
|
||||||
|
background-color: #121212;
|
||||||
|
}
|
||||||
|
#video1{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-content: center;
|
||||||
justify-items: center;
|
justify-content: center;
|
||||||
|
margin: auto;
|
||||||
|
height:100vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<divdiv id="video">
|
<div id="video1">
|
||||||
<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">
|
<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.
|
Your browser doesn't support embedded video. Sorry.
|
||||||
|
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user