[Checkins] SVN: lovely.flvplayer/trunk/src/lovely/flvplayer/ changes for better customization of the player. colors etc. message ids for labels inside flash-flvplayer

Manfred Schwendinger manfred.schwendiger at lovelysystems.com
Sat Feb 10 11:57:08 EST 2007


Log message for revision 72495:
  changes for better customization of the player. colors etc. message ids for labels inside flash-flvplayer

Changed:
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/configure.zcml
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.mo
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.po
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/locales/lovely.flvplayer.pot
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.js
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.swf
  A   lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayervars.pt
  U   lovely.flvplayer/trunk/src/lovely/flvplayer/resources/videofullscreen.html

-=-
Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/configure.zcml
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/configure.zcml	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/configure.zcml	2007-02-10 16:57:06 UTC (rev 72495)
@@ -15,13 +15,33 @@
  </configure>
  
  <!-- Flashdetection View  -->
-   <browser:page
-       for="*"
-       name="noflashdetected.html"
-       template="noflashdetected.pt"
-       permission="zope.Public"
-       />
-        
+ <browser:page
+     for="*"
+     name="noflashdetected.html"
+     template="noflashdetected.pt"
+     permission="zope.Public"
+     />
+
+ <browser:page
+     for="*"
+     name="flvplayervars.xml"
+     template="resources/flvplayervars.pt"
+     permission="zope.Public"
+     />
+ 
+ <browser:resource
+     name="flvplayer.swf"
+     file="resources/flvplayer.swf"
+     
+     />
+ 
+ <browser:zrt-resource
+     name="flvplayer.js"
+     file="resources/flvplayer.js"
+     
+     />
+
+ 
   <i18n:registerTranslations directory="locales" />
  
 </configure>
\ No newline at end of file

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.mo
===================================================================
(Binary files differ)

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.po
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.po	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/locales/de/LC_MESSAGES/lovely.flvplayer.po	2007-02-10 16:57:06 UTC (rev 72495)
@@ -1,3 +1,16 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: lovely.flvplayer\n"
+"POT-Creation-Date: Wed Jan 24 17:52:02 2007\n"
+"PO-Revision-Date: 2007-01-30 18:53+0100\n"
+"Last-Translator: Stephan Schwaerzler <manfred.schwendinger at lovelysystems.com>\n"
+"Language-Team: Lovely Systems <office at lovelysystems.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Country: AUSTRIA\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
 #. Default: "Flash Player detection failed. Please install the Flash Player Plugin. You can install the plugin <a href=\"http://www.adobe.com/go/getflashplayer\">here</a> for free."
 #: lib/python/lovely/flvplayer/noflashdetected.pt:1
 msgid "flash-detection-error"
@@ -2 +15,50 @@
 msgstr "Es konnte kein Flash Player festgestellt werden. Bitte installieren Sie den aktuellen Flash Player, den Sie <a href=\"http://www.adobe.com/go/getflashplayer\">hier</a> gratis erhalten."
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:10
+msgid "maximize"
+msgstr "maximieren"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:11
+#. Default: "original size"
+msgid "originalsize"
+msgstr "original Größe"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:13
+msgid "fullscreen"
+msgstr "Vollbild"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:14
+#. Default: "sounds on"
+msgid "soundson"
+msgstr "Ton ein"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:15
+#. Default: "sounds off"
+msgid "soundsoff"
+msgstr "Ton aus"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:16
+msgid "volume"
+msgstr "Lautstärke Pegel"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:17
+#. Default: "<![CDATA[recommend<br />video]]>"
+msgid "recommend"
+msgstr "<![CDATA[Video<br />empfehlen]]>"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:18
+#. Default: "<![CDATA[watch<br />again]]>"
+msgid "watchagain"
+msgstr "<![CDATA[Nochmals<br />ansehen]]>"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:7
+msgid "play"
+msgstr "abspielen"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:8
+msgid "pause"
+msgstr "pause"
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:9
+msgid "stop"
+msgstr "stop"
\ No newline at end of file

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/locales/lovely.flvplayer.pot
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/locales/lovely.flvplayer.pot	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/locales/lovely.flvplayer.pot	2007-02-10 16:57:06 UTC (rev 72495)
@@ -13,8 +13,8 @@
 ##############################################################################
 msgid ""
 msgstr ""
-"Project-Id-Version: Development/Unknown\n"
-"POT-Creation-Date: Thu Jan  4 12:56:50 2007\n"
+"Project-Id-Version: Development/Revision: 71546\n"
+"POT-Creation-Date: Sat Feb 10 16:53:29 2007\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope3-dev at zope.org>\n"
@@ -28,3 +28,52 @@
 msgid "flash-detection-error"
 msgstr ""
 
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:10
+msgid "maximize"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:11
+#. Default: "original size"
+msgid "originalsize"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:13
+msgid "fullscreen"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:14
+#. Default: "sounds on"
+msgid "soundson"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:15
+#. Default: "sounds off"
+msgid "soundsoff"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:16
+msgid "volume"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:17
+#. Default: "<![CDATA[recommend<br />video]]>"
+msgid "recommend"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:18
+#. Default: "<![CDATA[watch<br />again]]>"
+msgid "watchagain"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:7
+msgid "play"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:8
+msgid "pause"
+msgstr ""
+
+#: lib/python/lovely/flvplayer/resources/flvplayervars.pt:9
+msgid "stop"
+msgstr ""
+

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.js
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.js	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.js	2007-02-10 16:57:06 UTC (rev 72495)
@@ -1,4 +1,3 @@
-// flvplayer.js
 /**
 
     creates a flash flv video player instance.
@@ -35,8 +34,6 @@
     var flash_id = "videoplayer";
     var preview_url = "";
     var fullscreen = "0";
-    var bordercolor = "939D94";
-    var shapecolor = "EFAD00";
     var ad_url = "";    // url which should be played before playing the video (swf or flv)
     var ad_target = ""; // url that should be loaded in a new window if someone clicks onto the swf. 
     
@@ -53,15 +50,15 @@
     if (obj["autostart"]) autostart = obj.autostart==true ? "1" : "0";
     if (obj["flash_id"]) flash_id = obj.flash_id;
     if (obj["preview_url"]) preview_url = obj.preview_url;
-    if (obj["bordercolor"]) bodercolor = obj.bordercolor;
-    if (obj["shapecolor"]) shapecolor = obj.shapecolor;
     if (obj["ad_url"]) ad_url = obj.ad_url;
     if (obj["ad_target"]) ad_target = obj.ad_target; 
      
     var base_url = findBaseUrl();
     
-    // create the instance of the player via swfobject
-    var so = new SWFObject(base_url+"flvplayer.swf", flash_id, String(width), String(height), "8", "#FFFFFF");
+    var so = new SWFObject(base_url+"@@/flvplayer.swf",
+                           flash_id,
+                           String(width), String(height),
+                           "8", "#FFFFFF");
     
     so.addParam("quality", "high");
     so.addParam("wmode", "transparent");
@@ -71,8 +68,6 @@
     so.addVariable("video", flv_url);
     so.addVariable("autostart", autostart);
     so.addVariable("baseurl", base_url);
-    so.addVariable("bordercolor", bordercolor);
-    so.addVariable("shapecolor", shapecolor);
     
     if (preview_url != "") so.addVariable("preview", preview_url);
     if (obj.fullscreen)    so.addVariable("fullscreen", "1");
@@ -101,12 +96,16 @@
      
      @return    base url string
 */
+
 function findBaseUrl(){
     var tags = document.getElementsByTagName("script");
     for (var i=0; i<tags.length; i++){
         if (tags[i].getAttribute("src")){
             if (tags[i].getAttribute("src").indexOf("flvplayer.js")!=-1){
+
                 var base_url = tags[i].getAttribute("src").split("flvplayer.js")[0];
+                base_url = base_url.split("@@")[0]
+                
                 return base_url;
             }
         }
@@ -115,19 +114,15 @@
     alert("ERROR: flvplayer.swf unable to calculate baseUrl");
 }
 
-
 /**
     escapes the url including all ++ 
     this is required for flash 7
 */
-/*function forceEscape(url){
+/*
+function forceEscape(url){
     return url;
     //return escape(url).split("+").join("%2B");
-}*/
-
-
-/**
-    TODO
+}
 */
 
 function openFullScreenView(video_url){ 
@@ -140,7 +135,13 @@
     sOptions = sOptions + ',height=' + (screen.availHeight - 122).toString();
     sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';
 
-    wOpen = window.open( findBaseUrl()+'videofullscreen.html?url='+video_url, 'videofullscreen',  sOptions );
+
+    
+    var url = findBaseUrl() + '@@/lovely.flvplayer/videofullscreen.html?url='+
+        video_url;
+    
+    
+    wOpen = window.open(url, 'videofullscreen',  sOptions );
     wOpen.focus();
     wOpen.moveTo( 0, 0 );
     wOpen.resizeTo( screen.availWidth, screen.availHeight );

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayer.swf
===================================================================
(Binary files differ)

Added: lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayervars.pt
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayervars.pt	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayervars.pt	2007-02-10 16:57:06 UTC (rev 72495)
@@ -0,0 +1,20 @@
+<?xml version="1.0" ?>
+<var xmlns:i18n = "http://xml.zope.org/namespaces/i18n"
+     xmlns:tal = "http://xml.zope.org/namespaces/tal"
+     i18n:domain="lovely.flvplayer">
+  <var name="border_color">939D94</var>
+  <var name="shape_color">EFAD00</var>
+  <var name="default_color">6991B4</var>
+  <var name="label_play" i18n:translate="play">play</var>
+  <var name="label_pause" i18n:translate="pause">pause</var>
+  <var name="label_stop" i18n:translate="stop">stop</var>
+  <var name="label_maximize" i18n:translate="maximize">maximize</var>
+  <var name="label_originalsize"
+       i18n:translate="originalsize">original size</var>
+  <var name="label_fullscreen" i18n:translate="fullscreen">fullscreen</var>
+  <var name="label_soundson" i18n:translate="soundson">sounds on</var>
+  <var name="label_soundsoff" i18n:translate="soundsoff">sounds off</var>
+  <var name="label_volume" i18n:translate="volume">volume</var>
+  <var name="label_recommend" i18n:translate="recommend"><![CDATA[recommend<br />video]]></var>
+  <var name="label_watchagain" i18n:translate="watchagain"><![CDATA[watch<br />again]]></var>
+</var>
\ No newline at end of file


Property changes on: lovely.flvplayer/trunk/src/lovely/flvplayer/resources/flvplayervars.pt
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: lovely.flvplayer/trunk/src/lovely/flvplayer/resources/videofullscreen.html
===================================================================
--- lovely.flvplayer/trunk/src/lovely/flvplayer/resources/videofullscreen.html	2007-02-10 15:42:27 UTC (rev 72494)
+++ lovely.flvplayer/trunk/src/lovely/flvplayer/resources/videofullscreen.html	2007-02-10 16:57:06 UTC (rev 72495)
@@ -3,8 +3,11 @@
 <head>
 	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
 	<title>Video</title>
-	<script type="text/javascript" src="swfobject.js"></script>
-	<script type="text/javascript" src="flvplayer.js"></script>
+	<script type="text/javascript" src="swfobject.js"
+            tal:attributes="src context/++resource++swfobject.js"></script>
+	<script type="text/javascript" src="flvplayer.js"
+            tal:attributes="src context/++resource++flvplayer.js"></script>
+    
 </head>
 <body>
 	<div id="videotarget" style="width: 100%; height:100%;">



More information about the Checkins mailing list