summaryrefslogtreecommitdiff
path: root/scripts/video.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/video.js')
-rw-r--r--scripts/video.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/video.js b/scripts/video.js
new file mode 100644
index 0000000..e1d5948
--- /dev/null
+++ b/scripts/video.js
@@ -0,0 +1,16 @@
+function playVideo(elementId) {
+ var element = document.getElementById(elementId);
+
+ element.style.visibility = "visible";
+ element.style.opacity = "100%";
+ element.play();
+}
+
+function stopVideo(elementId) {
+ var element = document.getElementById(elementId);
+
+ element.style.visibility = "hidden";
+ element.style.opacity = "0%";
+ element.pause();
+ element.currentTime = 0;
+}