My situation:
HTML Code
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: Arial;
font-size: 17px;
}
#myVideo {
position: fixed;
min-width: 100%;
min-height: 100%;
}
video {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<video autoplay muted loop id="myVideo">
<source src="Videos/filename.mp4" type="video/mp4">
</video>
<script>
window.setInterval('refresh()', 12000); // Call a function every 12000 milliseconds (OR 12 seconds).
// Refresh or reload page.
function refresh() {
window .location.reload();
}
</script>
</body>
</html>
Updates implemented
Additional behaviours
What do I want to achieve?
I've seen here that with Node.js, I can get the newest file on a folder and save the name on a variable but,
Regards
Is there a way to do this by keeping it just with javascript and HTML? (or with ASP.NET/C#)
Plain JavaScript and HTML are client side static code. It cannot modify anything stored on the server. You will need a server side application to handle your video uploads, querying, etc. Pretty much all server side languages supports this feature (PHP, ASP, NodeJS, C++, Go, Rust...)
Have you used/implemented something similar (with pictures, documents, etc.)? What technologies did you use?
It's pretty much depends what you want to do. You can go the MVC route to render the HTML code, or going a separate approach by splitting client side and server side code and link them together with an API design.