From 46b3b62f20f07b224aaf839cd396bb21e56c49ac Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 17 May 2018 01:29:58 +0000 Subject: [PATCH] viewer for stereoscopic VR video svn path=/trunk/; revision=198 --- pages/stereoview.sh | 30 ++++++++++++ templates/stereoview.html.sh | 94 ++++++++++++++++++++++++++++++++++++ templates/view.html.sh | 2 + 3 files changed, 126 insertions(+) create mode 100755 pages/stereoview.sh create mode 100755 templates/stereoview.html.sh diff --git a/pages/stereoview.sh b/pages/stereoview.sh new file mode 100755 index 0000000..3f7a986 --- /dev/null +++ b/pages/stereoview.sh @@ -0,0 +1,30 @@ +#!/bin/zsh + +# Copyright 2018 Paul Hänsch +# +# This file is part of Serve0. +# +# Serve0 is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Serve0 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Serve0. If not, see . + +. $_EXEC/pages/common.sh + +info="${_GET[i]}" +render="$(validate "${_GET[r]}" '(180|360)' 360)" +location="$(invalidate "${_GET[l]}" '(.*/)?\.\.(/.*)?|' /)" +directory="${location%/*}" + +TITLE="$info" + +[ -n "$info" ] && video="videos/$info" \ + || video="${location#/}" diff --git a/templates/stereoview.html.sh b/templates/stereoview.html.sh new file mode 100755 index 0000000..c618ef6 --- /dev/null +++ b/templates/stereoview.html.sh @@ -0,0 +1,94 @@ +# Copyright 2018 Paul Hänsch +# +# This file is part of Serve0 +# +# Serve0 is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Serve0 is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Serve0 If not, see . + +cat < + + + + + +EOF + +# vi:set filetype=html: diff --git a/templates/view.html.sh b/templates/view.html.sh index b2c48db..1462421 100755 --- a/templates/view.html.sh +++ b/templates/view.html.sh @@ -47,6 +47,8 @@ cat <$(htmlsafe "$info") Download + View 180º Steroscopic + View 360º Steroscopic -- 2.39.2