Skip to content

Commit

Permalink
Add video player code for inline
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpage committed Aug 26, 2024
1 parent 718ba06 commit 9ee8532
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions genweb/templates/person.html.mako
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ years = sorted(set(e.get('file', "0000")[:4] for e in displayed_metadata))
<link rel="stylesheet" href="../static/styles.css">
<script>
<%include file="actions.js"/>
<%include file="video.js"/>
</script>
</head>
<body class="notranslate">
Expand Down
12 changes: 12 additions & 0 deletions genweb/templates/video.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function playPauseVideo(identifier) {
var myVideo = document.getElementById(identifier);
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}

function setWidth(identifier, size) {
var myVideo = document.getElementById(identifier);
myVideo.width = size;
}

0 comments on commit 9ee8532

Please sign in to comment.