[xiph-commits] r4016 - in itext: . javascript skins/schmucker styles

silvia at svn.annodex.net silvia at svn.annodex.net
Tue Sep 15 22:04:47 PDT 2009


Author: silvia
Date: 2009-09-15 22:04:47 -0700 (Tue, 15 Sep 2009)
New Revision: 4016

Modified:
   itext/
   itext/chocolate_rain.html
   itext/elephant_no_skin.html
   itext/elephant_with_skin.html
   itext/index.html
   itext/javascript/subtitles.js
   itext/skins/schmucker/tinyvid.js
   itext/styles/subtitles.css
Log:
Added audio element to chocolate rain example.
Changes to ITEXTCONTAINER.



Property changes on: itext
___________________________________________________________________
Modified: bzr:revision-info
   - timestamp: 2009-09-14 23:48:59.831000090 +1000
committer: Silvia Pfeiffer <silvia.pfeiffer at vquence.com>
properties: 
	branch-nick: silvia

   + timestamp: 2009-09-16 15:03:53.638000011 +1000
committer: Silvia Pfeiffer <silvia.pfeiffer at vquence.com>
properties: 
	branch-nick: silvia

Modified: bzr:file-ids
   - chocolate_rain.html	chocolate_rain.html-20090914132633-q8uc7crdfdazkj8r-1

   + chocolate_rain.html	chocolate_rain.html-20090914132633-q8uc7crdfdazkj8r-1
elephant_no_skin.html	elephant_no_skin.htm-20090802130343-dlzxqj7cts3o0n1v-1
elephant_with_skin.html	elephant.html-20090801091219-j75rjxuqu8rsxt53-1
index.html	index.html-20090718094218-d45036mvytq5pecp-3
javascript/subtitles.js	subtitles.js-20090718094218-d45036mvytq5pecp-10
skins/schmucker/tinyvid.js	tinyvid.js-20090718094218-d45036mvytq5pecp-53
styles/subtitles.css	subtitles.css-20090718094218-d45036mvytq5pecp-13

Modified: bzr:revision-id:v4
   - 1 silvia.pfeiffer at vquence.com-20090713110521-cz7evclxohf4rbs2
2 silvia.pfeiffer at vquence.com-20090714003359-apmpuor2ttarph5n
3 silvia.pfeiffer at vquence.com-20090714143931-q6j8ritt91jn5rhu
4 silvia.pfeiffer at vquence.com-20090718094222-58zgcmsg9gggbnt1
5 silvia.pfeiffer at vquence.com-20090718094708-wb83p9u6jr1xlhm6
6 silvia.pfeiffer at vquence.com-20090718095409-p6en5qufj62m8w3h
7 silvia.pfeiffer at vquence.com-20090718113424-9s8cmt1guxj6qoky
8 silvia.pfeiffer at vquence.com-20090718113445-n0q9c14w4i11pe36
9 silvia.pfeiffer at vquence.com-20090718123622-xdp52y76dvpem2ya
10 silvia.pfeiffer at vquence.com-20090718131644-69y0zml0ccbwc5er
11 silvia.pfeiffer at vquence.com-20090719002119-ekzto9pc7jqs3gw9
12 silvia.pfeiffer at vquence.com-20090719120832-srm8qemvr5jjy67w
13 silvia.pfeiffer at vquence.com-20090719130420-s7xjh35zrfj8117x
14 silvia.pfeiffer at vquence.com-20090720065454-m2g8tcjgpgw8aetr
15 silvia.pfeiffer at vquence.com-20090720131039-ivpstebztd7u3vwx
16 silvia.pfeiffer at vquence.com-20090720190949-r4ahzq2regl7opf1
17 silvia.pfeiffer at vquence.com-20090720210510-i54efp8a9sem4g6g
18 silvia.pfeiffer at vquence.com-20090721063829-4pvft92pnt7k966p
19 silvia.pfeiffer at vquence.com-20090721065410-0miir37pbb73k35r
20 silvia.pfeiffer at vquence.com-20090721065911-9ngk00aeujudpw8p
21 silvia.pfeiffer at vquence.com-20090721121059-uthu2kmvu74zjv06
22 silvia.pfeiffer at vquence.com-20090721125735-lwwo9ivbdhj0jdhp
23 silvia.pfeiffer at vquence.com-20090721130655-sdqdgbs0lexyrwh5
24 silvia.pfeiffer at vquence.com-20090721143346-065b9v0rr1tcmyg0
25 silvia.pfeiffer at vquence.com-20090722010421-9sx8ynfzcoxh1eai
26 silvia.pfeiffer at vquence.com-20090722014433-yrqaapi0kmfec1oh
27 silvia.pfeiffer at vquence.com-20090722062945-586zxe3smxv1gdcw
28 silvia.pfeiffer at vquence.com-20090727123838-lcxe2fb7n2111ipd
29 silvia.pfeiffer at vquence.com-20090728151700-ai24t8itvj8hxs0c
30 silvia.pfeiffer at vquence.com-20090728210031-2n53wzpuledyqg9w
31 silvia.pfeiffer at vquence.com-20090730034353-pcrnaae01i2q5430
32 silvia.pfeiffer at vquence.com-20090731122706-nrrle33ore1cjl87
33 silvia.pfeiffer at vquence.com-20090801092101-zyu1s0ntmio5bihb
34 silvia.pfeiffer at vquence.com-20090801092534-5pvl2ehkqi87p9le
35 silvia.pfeiffer at vquence.com-20090801233833-xa51k548ng1tqxso
36 silvia.pfeiffer at vquence.com-20090802130400-k998eftqulgcrp04
37 silvia.pfeiffer at vquence.com-20090802143005-c1sm52ru0kfed912
38 silvia.pfeiffer at vquence.com-20090827061919-ejpm51zs89ekbd56
39 silvia.pfeiffer at vquence.com-20090827061950-6fu26p80jdvdh50c
40 silvia.pfeiffer at vquence.com-20090901040002-3qs6tqiqcod3cda2
41 silvia.pfeiffer at vquence.com-20090901040227-o491w2qkp79a2a3r
42 silvia.pfeiffer at vquence.com-20090901040449-3xtimieabhw7fu7o
43 silvia.pfeiffer at vquence.com-20090901051757-h9l9753jy47x87zy
44 silvia.pfeiffer at vquence.com-20090901132958-3i65nroyeciazei3
45 silvia.pfeiffer at vquence.com-20090901230635-adfp1v5h24nvg30q
46 silvia.pfeiffer at vquence.com-20090902004049-ssqjbhtpz737oc90
47 silvia.pfeiffer at vquence.com-20090902022932-omg01n8yn6gg853c
48 silvia.pfeiffer at vquence.com-20090903010501-3vehjdbaxv2gyzzf
49 silvia.pfeiffer at vquence.com-20090912064418-3jw90gm7r0d2jjzk
50 silvia.pfeiffer at vquence.com-20090912065734-rx0kxsolg43lssa3
51 silvia.pfeiffer at vquence.com-20090912144329-yanfydw2pkoaxytw
52 silvia.pfeiffer at vquence.com-20090912152710-r2ga9oa451rmxgym
53 silvia.pfeiffer at vquence.com-20090912152945-l5voojx7ripnzono
54 silvia.pfeiffer at vquence.com-20090914014851-pt8aboskjyfhwecd
55 silvia.pfeiffer at vquence.com-20090914113345-t47n88dsqglme076
56 silvia.pfeiffer at vquence.com-20090914121706-2psey2lbp8tb70b6
57 silvia.pfeiffer at vquence.com-20090914121815-f09keijembthe6ug
58 silvia.pfeiffer at vquence.com-20090914124523-vlmi9jit1ztrgyu3
59 silvia.pfeiffer at vquence.com-20090914124902-2pcmkycne7fqfgv5
60 silvia.pfeiffer at vquence.com-20090914132553-o2ei9fl4706yjm1o
61 silvia.pfeiffer at vquence.com-20090914133103-hl9er0prbgvnht0w
62 silvia.pfeiffer at vquence.com-20090914134303-0jj8xyql5ixmd1ce
63 silvia.pfeiffer at vquence.com-20090914134859-gzoqbvy6hp73j2ij

   + 1 silvia.pfeiffer at vquence.com-20090713110521-cz7evclxohf4rbs2
2 silvia.pfeiffer at vquence.com-20090714003359-apmpuor2ttarph5n
3 silvia.pfeiffer at vquence.com-20090714143931-q6j8ritt91jn5rhu
4 silvia.pfeiffer at vquence.com-20090718094222-58zgcmsg9gggbnt1
5 silvia.pfeiffer at vquence.com-20090718094708-wb83p9u6jr1xlhm6
6 silvia.pfeiffer at vquence.com-20090718095409-p6en5qufj62m8w3h
7 silvia.pfeiffer at vquence.com-20090718113424-9s8cmt1guxj6qoky
8 silvia.pfeiffer at vquence.com-20090718113445-n0q9c14w4i11pe36
9 silvia.pfeiffer at vquence.com-20090718123622-xdp52y76dvpem2ya
10 silvia.pfeiffer at vquence.com-20090718131644-69y0zml0ccbwc5er
11 silvia.pfeiffer at vquence.com-20090719002119-ekzto9pc7jqs3gw9
12 silvia.pfeiffer at vquence.com-20090719120832-srm8qemvr5jjy67w
13 silvia.pfeiffer at vquence.com-20090719130420-s7xjh35zrfj8117x
14 silvia.pfeiffer at vquence.com-20090720065454-m2g8tcjgpgw8aetr
15 silvia.pfeiffer at vquence.com-20090720131039-ivpstebztd7u3vwx
16 silvia.pfeiffer at vquence.com-20090720190949-r4ahzq2regl7opf1
17 silvia.pfeiffer at vquence.com-20090720210510-i54efp8a9sem4g6g
18 silvia.pfeiffer at vquence.com-20090721063829-4pvft92pnt7k966p
19 silvia.pfeiffer at vquence.com-20090721065410-0miir37pbb73k35r
20 silvia.pfeiffer at vquence.com-20090721065911-9ngk00aeujudpw8p
21 silvia.pfeiffer at vquence.com-20090721121059-uthu2kmvu74zjv06
22 silvia.pfeiffer at vquence.com-20090721125735-lwwo9ivbdhj0jdhp
23 silvia.pfeiffer at vquence.com-20090721130655-sdqdgbs0lexyrwh5
24 silvia.pfeiffer at vquence.com-20090721143346-065b9v0rr1tcmyg0
25 silvia.pfeiffer at vquence.com-20090722010421-9sx8ynfzcoxh1eai
26 silvia.pfeiffer at vquence.com-20090722014433-yrqaapi0kmfec1oh
27 silvia.pfeiffer at vquence.com-20090722062945-586zxe3smxv1gdcw
28 silvia.pfeiffer at vquence.com-20090727123838-lcxe2fb7n2111ipd
29 silvia.pfeiffer at vquence.com-20090728151700-ai24t8itvj8hxs0c
30 silvia.pfeiffer at vquence.com-20090728210031-2n53wzpuledyqg9w
31 silvia.pfeiffer at vquence.com-20090730034353-pcrnaae01i2q5430
32 silvia.pfeiffer at vquence.com-20090731122706-nrrle33ore1cjl87
33 silvia.pfeiffer at vquence.com-20090801092101-zyu1s0ntmio5bihb
34 silvia.pfeiffer at vquence.com-20090801092534-5pvl2ehkqi87p9le
35 silvia.pfeiffer at vquence.com-20090801233833-xa51k548ng1tqxso
36 silvia.pfeiffer at vquence.com-20090802130400-k998eftqulgcrp04
37 silvia.pfeiffer at vquence.com-20090802143005-c1sm52ru0kfed912
38 silvia.pfeiffer at vquence.com-20090827061919-ejpm51zs89ekbd56
39 silvia.pfeiffer at vquence.com-20090827061950-6fu26p80jdvdh50c
40 silvia.pfeiffer at vquence.com-20090901040002-3qs6tqiqcod3cda2
41 silvia.pfeiffer at vquence.com-20090901040227-o491w2qkp79a2a3r
42 silvia.pfeiffer at vquence.com-20090901040449-3xtimieabhw7fu7o
43 silvia.pfeiffer at vquence.com-20090901051757-h9l9753jy47x87zy
44 silvia.pfeiffer at vquence.com-20090901132958-3i65nroyeciazei3
45 silvia.pfeiffer at vquence.com-20090901230635-adfp1v5h24nvg30q
46 silvia.pfeiffer at vquence.com-20090902004049-ssqjbhtpz737oc90
47 silvia.pfeiffer at vquence.com-20090902022932-omg01n8yn6gg853c
48 silvia.pfeiffer at vquence.com-20090903010501-3vehjdbaxv2gyzzf
49 silvia.pfeiffer at vquence.com-20090912064418-3jw90gm7r0d2jjzk
50 silvia.pfeiffer at vquence.com-20090912065734-rx0kxsolg43lssa3
51 silvia.pfeiffer at vquence.com-20090912144329-yanfydw2pkoaxytw
52 silvia.pfeiffer at vquence.com-20090912152710-r2ga9oa451rmxgym
53 silvia.pfeiffer at vquence.com-20090912152945-l5voojx7ripnzono
54 silvia.pfeiffer at vquence.com-20090914014851-pt8aboskjyfhwecd
55 silvia.pfeiffer at vquence.com-20090914113345-t47n88dsqglme076
56 silvia.pfeiffer at vquence.com-20090914121706-2psey2lbp8tb70b6
57 silvia.pfeiffer at vquence.com-20090914121815-f09keijembthe6ug
58 silvia.pfeiffer at vquence.com-20090914124523-vlmi9jit1ztrgyu3
59 silvia.pfeiffer at vquence.com-20090914124902-2pcmkycne7fqfgv5
60 silvia.pfeiffer at vquence.com-20090914132553-o2ei9fl4706yjm1o
61 silvia.pfeiffer at vquence.com-20090914133103-hl9er0prbgvnht0w
62 silvia.pfeiffer at vquence.com-20090914134303-0jj8xyql5ixmd1ce
63 silvia.pfeiffer at vquence.com-20090914134859-gzoqbvy6hp73j2ij
64 silvia.pfeiffer at vquence.com-20090916050353-ulfo15y9sl4x03ep

Modified: bzr:text-parents
   - chocolate_rain.html	silvia.pfeiffer at vquence.com-20090914133103-hl9er0prbgvnht0w

   + elephant_no_skin.html	silvia.pfeiffer at vquence.com-20090914132553-o2ei9fl4706yjm1o
elephant_with_skin.html	silvia.pfeiffer at vquence.com-20090827061919-ejpm51zs89ekbd56
index.html	silvia.pfeiffer at vquence.com-20090827061919-ejpm51zs89ekbd56
javascript/subtitles.js	silvia.pfeiffer at vquence.com-20090914124902-2pcmkycne7fqfgv5
skins/schmucker/tinyvid.js	silvia.pfeiffer at vquence.com-20090912144329-yanfydw2pkoaxytw
styles/subtitles.css	silvia.pfeiffer at vquence.com-20090912144329-yanfydw2pkoaxytw


Modified: itext/chocolate_rain.html
===================================================================
--- itext/chocolate_rain.html	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/chocolate_rain.html	2009-09-16 05:04:47 UTC (rev 4016)
@@ -51,41 +51,60 @@
     
     <h1>Demo Video and Audio Lyrics</h1>
 
-<div style="clear: all;">
+  <div class="videocontainer" style="position: relative; display: inline-block;">
 
-  <div class="videocontainer" style="position: relative; display:inline-block;">
-
 	  <div class="mc" style="float: left;" width="320px">
-      <div class="itextcontainer"></div>
+      <div id="itextcontainer1"></div>
 	    <video class="v" src="chocolate_rain/chocolate_rain.ogv"
-	           poster="chocolate_rain/chocolate_rain.png" controls aria-label="Elephants Dream video"
-	           title="Elephants Dream video">
+	           poster="chocolate_rain/chocolate_rain.png" controls aria-label="Chocolate Rain video"
+	           autobuffer title="Chocolate Rain video">
         <itext id="lyrics" lang="en" type="text/lrc" display="yes"
-               src="chocolate_rain/chocolaterain.lrc" category="LRC"></itext>
+               src="chocolate_rain/chocolaterain.lrc" category="SUB"></itext>
 	    </video>
 	  </div>
 
   </div>
 
-</div>
+  <div class="audiocontainer" style="position: relative; display: inline-block;">
 
+    <div class="mc" style="float: right;" width="320px">
+      <div id="itextcontainer2"></div>
+      <audio class="a" src="chocolate_rain/chocolate_rain.ogg"
+           controls aria-label="Chocolate Rain song"
+           autobuffer title="Chocolate Rain song">
+        <itext id="lyrics" lang="en" type="text/lrc" display="yes"
+               src="chocolate_rain/chocolaterain.lrc" category="LRC"></itext>
+      </audio>
+    </div>
 
+  </div>
+
+
 <script type="text/javascript">  
-  // get video element
+  // get video and audio element
   var video = document.getElementsByTagName("video")[0];
+  var audio = document.getElementsByTagName("audio")[0];
   
   // parse itexts and create an invisible menu for them
-	var itexts=new ItextCollection(jQuery(video));
-	itexts.itextMenu(jQuery("#menu"), "window");
+	var itexts1=new ItextCollection(jQuery(video), "itextcontainer1");
+	var itexts2=new ItextCollection(jQuery(audio), "itextcontainer2");
 	
   // set callback for video
   video.addEventListener("timeupdate", function() {
 		if (video.paused || video.ended) {
 			return;
 		}
-		itexts.show(self.video.currentTime);
+		itexts1.show(self.video.currentTime);
 	}, false);
 
+  // set callback for audio
+  audio.addEventListener("timeupdate", function() {
+		if (audio.paused || audio.ended) {
+			return;
+		}
+		itexts2.show(self.audio.currentTime);
+	}, false);
+
 </script>
 
 <p>Note: The demo works best in Firefox version >= 3.5, but also in the latest experimental releases of Safari (with XiphQT installed), Opera and Chrome. It will not work in IE.</p>

Modified: itext/elephant_no_skin.html
===================================================================
--- itext/elephant_no_skin.html	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/elephant_no_skin.html	2009-09-16 05:04:47 UTC (rev 4016)
@@ -66,7 +66,7 @@
 
   <div class="videocontainer" style="position: relative; display:inline-block;">
 	<div class="mc" style="float: left;" width="426px">
-    <div class="itextcontainer"></div>
+    <div id="itextcontainer"></div>
 	  <video class="v" src="elephants_dream/elephant.ogv" poster="elephants_dream/elephant.png" controls aria-label="Elephants Dream video" title="Elephants Dream video">
 	<!-- Language Tags http://www.iana.org/assignments/language-subtag-registry -->
 	<itext id="video_af" lang="af" type="text/srt" charset="ISO-8859" display="auto"
@@ -160,7 +160,7 @@
   var video = document.getElementsByTagName("video")[0];
   
   // parse itexts and create an invisible menu for them
-	var itexts=new ItextCollection(jQuery(video));
+	var itexts=new ItextCollection(jQuery(video), "itextcontainer");
 	itexts.itextMenu(jQuery("#menu"), "window");
 	
   // set callback for video

Modified: itext/elephant_with_skin.html
===================================================================
--- itext/elephant_with_skin.html	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/elephant_with_skin.html	2009-09-16 05:04:47 UTC (rev 4016)
@@ -61,7 +61,7 @@
 				</div></div></div>
 				<div class="mw"><div class="me"><div class="mc">
 
-        <div class="itextcontainer"></div>
+        <div id="itextcontainer"></div>
 	      
 	<video class="v" src="elephants_dream/elephant.ogv" poster="elephants_dream/elephant.png" >
 	<!-- Language Tags http://www.iana.org/assignments/language-subtag-registry -->

Modified: itext/index.html
===================================================================
--- itext/index.html	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/index.html	2009-09-16 05:04:47 UTC (rev 4016)
@@ -61,7 +61,7 @@
 				</div></div></div>
 				<div class="mw"><div class="me"><div class="mc">
 
-        <div class="itextcontainer"></div>
+        <div id="itextcontainer"></div>
 	      
 	<video class="v" src="elephants_dream/elephant.ogv" poster="elephants_dream/elephant.png" >
 	<!-- Language Tags http://www.iana.org/assignments/language-subtag-registry -->

Modified: itext/javascript/subtitles.js
===================================================================
--- itext/javascript/subtitles.js	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/javascript/subtitles.js	2009-09-16 05:04:47 UTC (rev 4016)
@@ -495,20 +495,22 @@
 // class to handle all itexts
 // would need to be implemented inside Browser as default
 // but does not need javascript API exposure
-var ItextCollection = function (video) {
-	this.init(video);
+var ItextCollection = function (video, div_id) {
+	this.init(video, div_id);
 };
 jQuery.extend(ItextCollection.prototype, {
 	video: null,
+	div_id: null,
 	tracks: [],
 	primary_lang: -1,
 	
-	init: function (vid) {
+	init: function (vid, div) {
 		this.video = vid;
+		this.div_id = div;
 		this.load();
 		// set up display divs for each category
 		for (var i in this.tracks) {
-			jQuery(".itextcontainer").append("<div class='itext_" + i + "'></div>");
+			jQuery("#" + this.div_id).append("<div class='itext_" + i + "'></div>");
 		}
 	},
 	load: function () {
@@ -595,36 +597,47 @@
 		
 	    // add to correct content container
 		var mc_width = jQuery('.mc').css("width").substr(0, jQuery('.mc').css("width").length - 2);
-		
+
 	    for (i in content) {
 			if (content[i]) {
 				// replace content of itext div
-				if (jQuery(".itext_" + i).html() !== content[i]) {
-					jQuery(".itext_" + i).html(content[i]);
+				if (jQuery("#" + this.div_id + " > .itext_" + i).html() !== content[i]) {
+console.log(jQuery("#" + this.div_id + " > .itext_" + i + " > .text").css("width"));
+					jQuery("#" + this.div_id + " > .itext_" + i).html(content[i]);
 					if (i === "CUE") {
-						jQuery(".itext_" + i + " > .text").prepend("Chapter: ");
+						jQuery("#" + this.div_id + " > .itext_" + i + " > .text").prepend("Chapter: ");
 					}
 					if (i === "TAD")	{
-						jQuery(".itext_TAD").attr("aria-live", "assertive");
-						jQuery(".itext_TAD").css("max-width", (mc_width) + "px");
-						jQuery(".itext_TAD").css("bottom", "5px");
+						jQuery("#" + this.div_id + " > .itext_TAD").attr("aria-live", "assertive");
+						jQuery("#" + this.div_id + " > .itext_TAD").css("max-width", (mc_width) + "px");
+						jQuery("#" + this.div_id + " > .itext_TAD").css("bottom", "5px");
 					}
-					jQuery(".itext_" + i).css("visibility", "visible");
+					if (i === "LRC") {
+						jQuery("#" + this.div_id + " > .itext_LRC").css("max-width", mc_width + "px");
+						jQuery("#" + this.div_id + " > .itext_LRC").css("bottom", "38px");					
+						var text_half_length = jQuery("#" + this.div_id + " > .itext_LRC > .text").css("width").substr(0, jQuery("#" + this.div_id + " > .itext_LRC > .text").css("width").length - 2) / 2;
+						jQuery("#" + this.div_id + " > .itext_LRC").css("left", ((mc_width / 2) - text_half_length - 14) + "px");
+					}
+					jQuery("#" + this.div_id + " > .itext_" + i).css("visibility", "visible");
 					if (i === "CC" ||
 		      			i === "SUB" ||
 		      			i === "KTV" ||
 		      			i === "TRX" ||
-		      			i === "LRC" ||
 		      			i === "LIN") {
 						// anyone with a better idea for how to place the captions bottom center, please speak up
-						jQuery(".itext_" + i).css("max-width", (mc_width - 14) + "px");
-						var text_half_length = jQuery(".itext_" + i + " > .text").css("width").substr(0, jQuery(".itext_" + i + " > .text").css("width").length - 2) / 2;
-						jQuery(".itext_" + i).css("left", (mc_width / 2 - text_half_length - 7) + "px");
-						jQuery(".itext_" + i).css("bottom", "20px");
+//						jQuery("#" + this.div_id + " > .itext_" + i).css("max-width", mc_width + "px");
+						jQuery("#" + this.div_id + " > .itext_" + i).css("bottom", "23px");
+						var text_half_length = jQuery("#" + this.div_id + " > .itext_" + i + " > .text").css("width").substr(0, jQuery("#" + this.div_id + " > .itext_" + i + " > .text").css("width").length - 2) / 2;
+//console.log(text_half_length);
+//console.log(((mc_width / 2) - text_half_length - 7));
+console.log(jQuery("#" + this.div_id + " > .itext_" + i + " > .text").css("width"));
+						jQuery("#" + this.div_id + " > .itext_" + i).css("left", ((mc_width / 2) - text_half_length - 7) + "px");
+console.log("inside");
+console.log(jQuery("#" + this.div_id + " > .itext_" + i + " > .text").css("width"));
 					}
 				}
 			} else {
-				jQuery(".itext_" + i).css("visibility", "hidden");
+				jQuery("#" + this.div_id + " > .itext_" + i).css("visibility", "hidden");
 			}
 		}
 	}

Modified: itext/skins/schmucker/tinyvid.js
===================================================================
--- itext/skins/schmucker/tinyvid.js	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/skins/schmucker/tinyvid.js	2009-09-16 05:04:47 UTC (rev 4016)
@@ -206,7 +206,7 @@
 	this.soundListener=new das.EvtListener(this.baseEl.querySelector("a.sound"),"click",this.sound);
 
 	// parse itexts and create an invisible menu for them
-	this.itexts=new ItextCollection(jQuery(this.video));
+	this.itexts=new ItextCollection(jQuery(this.video), "itextcontainer");
 	this.itexts.itextMenu(jQuery(".mc"), "playerControllers[0]");
 	this.visitext = false;
 

Modified: itext/styles/subtitles.css
===================================================================
--- itext/styles/subtitles.css	2009-09-14 13:52:28 UTC (rev 4015)
+++ itext/styles/subtitles.css	2009-09-16 05:04:47 UTC (rev 4016)
@@ -82,11 +82,11 @@
 div.itext_CC, div.itext_SUB, div.itext_KTV, div.itext_TRX, div.itext_LRC, div.itext_LIN {
 	background-color: #333333;
     opacity:0.8;
-	padding: 7px 7px 4px 7px;
+/*	padding: 7px 7px 4px 7px; */
 	visibility: hidden;
 	bottom: 0;
     position: absolute;
-	z-index: 100;
+	z-index: 1;
 }
 
 div.itext_TAD {



More information about the commits mailing list