this doesn't work i know it
git-svn-id: http://yolanda.mister-muffin.de/svn@242 7eef14d0-6ed0-489d-bf55-20463b2d70db
This commit is contained in:
parent
46e7fc71b3
commit
ec9b764967
6 changed files with 110 additions and 29 deletions
|
@ -186,7 +186,8 @@ sub output_page
|
||||||
|
|
||||||
#send everything including http headers to the user - if xslt chosen is xspf set download filename
|
#send everything including http headers to the user - if xslt chosen is xspf set download filename
|
||||||
return $session->header(
|
return $session->header(
|
||||||
-type=>'text/xml',
|
-type=>'application/xhtml+xml',
|
||||||
|
# fix the MIME type so that every XSLT works again
|
||||||
-charset=>'UTF-8',
|
-charset=>'UTF-8',
|
||||||
-cookie=>@cookies
|
-cookie=>@cookies
|
||||||
),
|
),
|
||||||
|
|
BIN
trunk/images/agplv3-155x51.png
Normal file
BIN
trunk/images/agplv3-155x51.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
|
@ -137,12 +137,15 @@ a
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
div.footer
|
div.footer
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 1.5em;
|
bottom: 1.5em;
|
||||||
margin-right: 1.5em;
|
margin-right: 1.5em;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
img.logo-header
|
img.logo-header
|
||||||
{
|
{
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -178,7 +178,7 @@ while(1)
|
||||||
$vwidth = int($vheight*($width/$height)/8 + .5)*8;
|
$vwidth = int($vheight*($width/$height)/8 + .5)*8;
|
||||||
|
|
||||||
$abitrate = 64;
|
$abitrate = 64;
|
||||||
$vbitrate = int($filesize*8) / $duration + .5) - $abitrate;
|
$vbitrate = int(($filesize*8) / $duration + .5) - $abitrate;
|
||||||
|
|
||||||
#TODO: add metadata information
|
#TODO: add metadata information
|
||||||
system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id /tmp/$id";
|
system "ffmpeg2theora --optimize --videobitrate $vbitrate --audiobitrate $abitrate --sharpness 0 --width $vwidth --height $vheight --output $root/videos/$id /tmp/$id";
|
||||||
|
@ -208,7 +208,7 @@ while(1)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TODO: maybe make this event-driven by using the kernels has-this-file-changed-interface ?
|
#TODO: maybe make this event-driven by using the kernels has-this-file-changed-interface ?
|
||||||
sleep 10;
|
sleep 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,15 @@
|
||||||
omit-xml-declaration="no"
|
omit-xml-declaration="no"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<xsl:include href="./xhtml/advancedsearch.xsl"/>
|
||||||
|
<xsl:include href="./xhtml/embedded.xsl"/>
|
||||||
<xsl:include href="./xhtml/frontpage.xsl"/>
|
<xsl:include href="./xhtml/frontpage.xsl"/>
|
||||||
<xsl:include href="./xhtml/loginform.xsl"/>
|
<xsl:include href="./xhtml/loginform.xsl"/>
|
||||||
|
<xsl:include href="./xhtml/register.xsl"/>
|
||||||
<xsl:include href="./xhtml/results.xsl"/>
|
<xsl:include href="./xhtml/results.xsl"/>
|
||||||
|
<xsl:include href="./xhtml/settings.xsl"/>
|
||||||
<xsl:include href="./xhtml/upload.xsl"/>
|
<xsl:include href="./xhtml/upload.xsl"/>
|
||||||
<xsl:include href="./xhtml/video.xsl"/>
|
<xsl:include href="./xhtml/video.xsl"/>
|
||||||
<xsl:include href="./xhtml/register.xsl"/>
|
|
||||||
<xsl:include href="./xhtml/settings.xsl"/>
|
|
||||||
<xsl:include href="./xhtml/advancedsearch.xsl"/>
|
|
||||||
|
|
||||||
<xsl:variable name="locale">
|
<xsl:variable name="locale">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -51,11 +52,16 @@
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="application/xhtml+xml;charset=utf-8" />
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="not(//@embed='true')">
|
<xsl:when test="not(//@embed)">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
|
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
|
||||||
<link rel="stylesheet" type="text/css">
|
<link rel="stylesheet" type="text/css">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
@ -63,7 +69,7 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</link>
|
</link>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="//@embed='true'">
|
<xsl:when test="//@embed='video'">
|
||||||
<!--
|
<!--
|
||||||
embedded stylesheet should rather be done through URL like
|
embedded stylesheet should rather be done through URL like
|
||||||
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
|
"http://localhost/video/4chan%20city/3/embed=true+stylesheet=embedded.css"
|
||||||
|
@ -148,13 +154,7 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<xsl:if test="not(//@embed='true')">
|
<xsl:if test="not(//@embed)">
|
||||||
|
|
||||||
<!--
|
|
||||||
<a href="/">
|
|
||||||
<img class="logo-header" src="/images/logo-small.png" alt="Yolanda logo top (160x25)" />
|
|
||||||
</a>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
|
||||||
|
@ -208,7 +208,9 @@
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
|
<xsl:value-of select="$site_strings[@id='path_login-openid']" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
<!--
|
||||||
<img class="openid-icon" src="/images/openid-icon.png" alt="open id logo" />
|
<img class="openid-icon" src="/images/openid-icon.png" alt="open id logo" />
|
||||||
|
-->
|
||||||
<xsl:value-of select="$locale_strings[@id='login_openid']" />
|
<xsl:value-of select="$locale_strings[@id='login_openid']" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -293,7 +295,7 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
<xsl:if test="not(//@embed='true')">
|
<xsl:if test="not(//@embed)">
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
<xsl:template name="video">
|
<xsl:template name="video">
|
||||||
|
|
||||||
|
<!--
|
||||||
<xsl:if test="not(//@embed='true')">
|
<xsl:if test="not(//@embed='true')">
|
||||||
<div class="videotitle">
|
<div class="videotitle">
|
||||||
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
|
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:title" />
|
||||||
|
@ -25,10 +26,82 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
this looks awfully ugly, but nevertheless generates javascript inside _valid_ XHTML
|
||||||
|
kudos to toby white who details the solution on http://scispace.net/tow21/weblog/718.html
|
||||||
|
-->
|
||||||
|
|
||||||
|
<xsl:text disable-output-escaping="yes"><![CDATA[
|
||||||
|
<![CDATA[
|
||||||
|
|
||||||
|
//alert('script works');
|
||||||
|
|
||||||
|
function hide_movie()
|
||||||
|
{
|
||||||
|
var _video = document.getElementbyId('video');
|
||||||
|
document.removeChild(_video);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function show_movie()
|
||||||
|
{
|
||||||
|
var _container = document.getElementById('container');
|
||||||
|
var _thumbnail = document.getElementById('thumbnail');
|
||||||
|
_container.removeChild(_thumbnail);
|
||||||
|
|
||||||
|
if (navigator.mimeTypes
|
||||||
|
&& navigator.mimeTypes["application/ogg"]
|
||||||
|
&& navigator.mimeTypes["application/ogg"].enabledPlugin)
|
||||||
|
{
|
||||||
|
_film = document.createElement('object');
|
||||||
|
_film.type = "application/ogg";
|
||||||
|
]]>
|
||||||
|
</xsl:text>
|
||||||
|
<xsl:value-of select="concat('_film.data = "',//video/rdf:RDF/cc:Work/@rdf:about,'view=true','";')" />
|
||||||
|
<xsl:text disable-output-escaping="yes">
|
||||||
|
<![CDATA[
|
||||||
|
_film.height = "480";
|
||||||
|
_film.width = "640";
|
||||||
|
_film_alt = document.createTextNode('LOL OGG');
|
||||||
|
_film.appendChild(_film_alt);
|
||||||
|
_container.appendChild(_film);
|
||||||
|
}
|
||||||
|
else if (navigator.mimeTypes
|
||||||
|
&& navigator.mimeTypes["application/x-java-applet"]
|
||||||
|
&& navigator.mimeTypes["application/x-java-applet"].enabledPlugin)
|
||||||
|
{
|
||||||
|
_elseh1 = document.createElement('h1');
|
||||||
|
_elsetext = document.createTextNode('LOL JAVA');
|
||||||
|
_elseh1.appendChild(_elsetext);
|
||||||
|
_container.appendChild(_elseh1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_elseh1 = document.createElement('h1');
|
||||||
|
_elsetext = document.createTextNode('NO PLUGIN FOUND');
|
||||||
|
_elseh1.appendChild(_elsetext);
|
||||||
|
_container.appendChild(_elseh1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]]]]></xsl:text>
|
||||||
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="video" id="container">
|
||||||
|
|
||||||
|
<div id="thumbnail">
|
||||||
|
thumbnail
|
||||||
|
<input type="button" value="playback" onclick="show_movie()" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="video">
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="//video/@cortado='true'">
|
<xsl:when test="//video/@cortado='true'">
|
||||||
|
|
||||||
<applet
|
<applet
|
||||||
code="com.fluendo.player.Cortado.class"
|
code="com.fluendo.player.Cortado.class"
|
||||||
archive="/java/cortado-ovt-stripped-0.2.2.jar"
|
archive="/java/cortado-ovt-stripped-0.2.2.jar"
|
||||||
|
@ -58,6 +131,7 @@
|
||||||
<param name="showStatus" value="show"/>
|
<param name="showStatus" value="show"/>
|
||||||
<param name="bufferSize" value="200"/>
|
<param name="bufferSize" value="200"/>
|
||||||
</applet>
|
</applet>
|
||||||
|
|
||||||
<div class="watch-browserplugin">
|
<div class="watch-browserplugin">
|
||||||
<a>
|
<a>
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
@ -75,7 +149,7 @@
|
||||||
</div>
|
</div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<object type="application/ogg">
|
<object type="application/ogg" style="float: left;" id="video">
|
||||||
<xsl:attribute name="width">
|
<xsl:attribute name="width">
|
||||||
<xsl:value-of select="//video/@width" />
|
<xsl:value-of select="//video/@width" />
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
@ -106,21 +180,22 @@
|
||||||
</div>
|
</div>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<xsl:if test="//@embed='true'">
|
|
||||||
<div class="embedded-backlink">
|
|
||||||
<a target="_blank">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="//video/rdf:RDF/cc:Work/dc:identifier" />
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$locale_strings[@id='backlink']" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
<xsl:if test="not(//@embed='true')">
|
<xsl:if test="not(//@embed='true')">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<object type="application/xml" style="float: left">
|
||||||
|
<xsl:attribute name="data">
|
||||||
|
<xsl:value-of select="concat(//rdf:RDF/cc:Work/dc:identifier, 'embed=video')"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:attribute name="width">
|
||||||
|
75%
|
||||||
|
</xsl:attribute>
|
||||||
|
</object>
|
||||||
|
-->
|
||||||
|
|
||||||
<xsl:call-template name="videometadata"/>
|
<xsl:call-template name="videometadata"/>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue