Skip to content

Commit

Permalink
Show inscription preview video controls on click (#4139)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Dec 19, 2024
1 parent a0a7a78 commit e0e8d40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions static/preview-video.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document.getElementsByTagName('video')[0].addEventListener('click', (event) => {
event.target.controls = true;
});
3 changes: 2 additions & 1 deletion templates/preview-video.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<head>
<meta charset=utf-8>
<link rel=stylesheet href=/static/preview-video.css>
<script src=/static/preview-video.js type=module defer></script>
</head>
<body>
<video controls loop muted autoplay>
<video loop muted autoplay>
<source src=/content/{{self.inscription_id}}>
</video>
</body>
Expand Down

0 comments on commit e0e8d40

Please sign in to comment.