From 9ee8532de8536f280ff30ea36b6c0754510326e8 Mon Sep 17 00:00:00 2001 From: Marc Page Date: Mon, 26 Aug 2024 07:53:38 -0500 Subject: [PATCH] Add video player code for inline --- genweb/templates/person.html.mako | 1 + genweb/templates/video.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 genweb/templates/video.js diff --git a/genweb/templates/person.html.mako b/genweb/templates/person.html.mako index 705d673..fa906ec 100644 --- a/genweb/templates/person.html.mako +++ b/genweb/templates/person.html.mako @@ -15,6 +15,7 @@ years = sorted(set(e.get('file', "0000")[:4] for e in displayed_metadata)) diff --git a/genweb/templates/video.js b/genweb/templates/video.js new file mode 100644 index 0000000..527a6b0 --- /dev/null +++ b/genweb/templates/video.js @@ -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; +}