Cache-busting and anonymous crossorigin for video

pull/1/head
Charlotte Som 2021-11-05 20:40:42 +00:00
parent d0be5f66cb
commit 30d1429e83
2 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>watch party :D</title> <title>watch party :D</title>
<link rel="stylesheet" href="/styles.css" /> <link rel="stylesheet" href="/styles.css?v=1" />
</head> </head>
<body> <body>
@ -47,6 +47,6 @@
</form> </form>
</div> </div>
<script src="/main.js"></script> <script src="/main.js?v=1"></script>
</body> </body>
</html> </html>

View File

@ -6,6 +6,7 @@ const createVideoElement = (videoUrl, subtitles) => {
const video = document.createElement("video"); const video = document.createElement("video");
video.controls = true; video.controls = true;
video.autoplay = false; video.autoplay = false;
video.crossOrigin = "anonymous";
const source = document.createElement("source"); const source = document.createElement("source");
source.src = videoUrl; source.src = videoUrl;