Changeset 1979


Ignore:
Timestamp:
08/25/11 08:17:03 (21 months ago)
Author:
jeroen
Message:

fixed HTML5 captions rendering, enhanced scaling to screen and started on HTML5 selection menu

Location:
plugins/captions
Files:
2 added
16 edited

Legend:

Unmodified
Added
Removed
  • plugins/captions/captions.js

    r1975 r1979  
    1 (function(a){var b=function(d,h,r){var o={back:false,color:"#FFFFFF",fontFamily:"Arial,sans-serif",fontSize:15,fontStyle:"normal",fontWeight:"normal",state:true,textDecoration:"none"};var m=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6ZJREFUeNrsWM9LVFEUfm8cU7NsxkwU+zGhRQWB1aY29RYtXIVRUO1mKW1qE/inCG2ENq0qCMJFCxcupBYFQQxSYog1CPkDC8ccnb5D37XD5YmPeU9fxD3wcd67c+be85177r3nPs9z4sSJEydOnPw/4kcxqtVqYrcPaCZagENAm2proo3oLNBIbcsvoEq9RlSIH8Ay8BNYZdua7/ubO/mYjUj4HtBDR7NRAxBTNoB1YA54khSRDqB1m98kiiVgnoML2aNAL2fKdu4LMM2IS0DywGngiGXbQOSjOJiNGbUp4DmmfjUkHQ9D3SQpj2nyDLZTIbavoa4BQb2OZGKQWAFeGhJwJgM0cz15aP8O9Qow+T2uScCuCcjStgaM4/FDGkQ+YfAV9X4deASc3dpJfP8rVJmv04pEN9QD4JbdZxpEFq3348zpcyFrqMoZNHIM2C/rCKTaVPtqvc7EWSOb22zlB+FcJ/uucsFXLfuMWtA9sG/h7+1pENlOTgD3Q9ZTmAiRO0kMmkmQwF6cLXtCJFXS2V1wbgF4wyDJAXiRpUxo9QNMsizxeCheSo2IOTsoy9h2J9VvPSGL2FdE3sF+nrYn6yUSJ7Ua1HlRo1OmKLTHyFhj1VTJUk0i5eLMSIf1/pH9vbXa8ySdU+fEZxaDcwjCgrJtS4NIH1Kh3TgCPQE1YaVcL6tmk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wEbqUrCeWj8jDX6AGTANvpNvYBJ8Au+pJ8mU4zi/lvMxkmXA90ALgynL9gX4lDnwE7wC7UEFsg9s8fjvI7gL3vLhMipHwWmOlJZ50A8eg68gDKLgLNhv2K4j0cBeDabWUNpd7oNqj2v2gBfKdhKc8Zq6oNPjGUP5DmQMbFc2YVABHNXXDOZpHzPuWQ5Kjb7uXAMJ+YjvARbhuGpfB1/AhcVM4jivoQbZfKQcPgw1ArqNez7M1Rk/gYwY7eOgGFw0+iUDpcCY6jsGNoNTCKpG9U/k6kzERyDzRjtMvQPOHYQuYQCSsmfBb5fnymI+wnUmKbahEIF4peAT4I3RN+5hK4HcCWIdh4qCEydPtv9XIJE8BDIMbvDeskFeAbs8bKVkibMskd8HwNWVDiSt0qmjnBtF2o2r/1pcFnHGVhLALdi/o+3JXAPxM7VK1H4hQS2wOe2SzYqNl7agMl8qiCnnZ0T2Gu0eVrs3jf56BlLH+iqzOUox+BIvYVjZ1uS1DPUoUSZA/TLXtSv7a8vYSonTW4haS+QpiLrYO+A8+KBsZ8Blj/vXgh4/RWO2B6shThE3mQLPuAnOcgo1c+qFXBKELOznLP+lzD8kuzvLfzcZxvRrCCqQXh6syrgbr4QsHqwQSHtQgUR4hK0i2/jmt7It9VQ5T5AlDDjMZBJiHZXJbHMcuRQdlaNukkiBOQo+/+1R14oVK/nbJBvljL5a/PFTa10Cu9fa6MjXk9alRmgpG45uY6Gc76Nj4sQI2yKtLrYd/K7VR92q7jGg+jsKGYh8WLutHK5zsR1Qzss1A+oeneravkIedROgTd4o9DkPmybszv08u4huUv89oU4W+syepGNtLFXibjaZtUGdXE1ZKyNxjkqlqplMkY/cCU6vBNurJpBBOh2j7mJ/zMU2Rvsu6phxj8zIDtod2ooVK1b+KfkjwAC9JXx/mwsoAgAAAABJRU5ErkJggg=="];var v;var x;var i;var f=[];var u;function k(z,C){z="jwplayercaptions"+z;if(C!==undefined){var D=z+"="+C+"; expires=Wed, 1 Jan 2020 00:00:00 UTC; path=/";document.cookie=D}else{var B=document.cookie.split(";");for(var A=0;A<B.length;A++){var D=B[A];while(D.charAt(0)==" "){D=D.substring(1,D.length)}if(D.indexOf(z)==0){return D.substring(z.length+1,D.length)}}}return null}var w=function(){if(f.length>1){x.show();try{d.getPlugin("display").hide();d.getPlugin("dock").hide()}catch(z){}}else{if(f.length==1){o.state=!o.state;k("state",o.state);e()}}};function p(z){console.log("CAPTIONS("+z+")")}function n(z){u="idle";e()}function q(z){i=0;f=[];v.update(0);x.hide();try{d.getPlugin("display").show();d.getPlugin("dock").show()}catch(E){}var G=d.getPlaylist()[z.index];if(G["captions.files"]){var I=false;var A=G["captions.files"].split(",");if(G["captions.labels"]){var D=G["captions.labels"].split(",")}for(var C=0;C<A.length;C++){var F={file:A[C]};if(D&&D[C]){F.label=D[C]}else{F.label=A[C].substring(A[C].lastIndexOf("/")+1,A[C].indexOf(".")-1)}if(o.label==F.label){I=true;i=f.length;y(F.file)}f.push(F)}if(I==false){o.state=false}var H=[{label:"(Off)"}];for(var B=0;B<f.length;B++){H.push({label:f[B].label})}if(o.state){x.populate(H,i+1)}else{x.populate(H,0)}}else{if(G["captions.file"]){f.push({file:G["captions.file"]});y(f[0].file)}}e()}function y(A){var z=new a.captions.srt(t,p);z.load(A)}function t(z){v.populate(z);f[i].data=z;e()}function j(z){u="playing";e()}function s(z){if(o.file){d.getPlaylist()[0]["captions.file"]=o.file}if(o.files){d.getPlaylist()[0]["captions.files"]=o.files}if(o.labels){d.getPlaylist()[0]["captions.labels"]=o.labels}}function e(){if(!f.length){d.getPlugin("dock").setButton("captions",w,m[0]);v.hide()}else{if(o.state){d.getPlugin("dock").setButton("captions",w,m[2]);if(u=="playing"){v.show()}else{v.hide()}}else{d.getPlugin("dock").setButton("captions",w,m[1]);v.hide()}}}this.resize=function(A,z){if(d.getRenderingMode()=="flash"){return}v.resize(A,z);x.resize(A,z)};function g(){if(d.getRenderingMode()=="flash"){return}d.onPlaylist(s);d.onPlaylistItem(q);d.onIdle(n);d.onPlay(j);d.onTime(c);if(k("state")!==null){if(k("state")=="true"){o.state=true}else{o.state=false}}if(k("label")!==null){o.label=k("label")}for(var z in h){o[z]=h[z]}v=new a.captions.renderer(o,r);x=new a.captions.selector(l,r);e()}d.onReady(g);function l(A){x.hide();try{d.getPlugin("display").show();d.getPlugin("dock").show()}catch(z){}if(A>0){o.state=true;i=A-1;o.label=f[i].label}else{_config.state=false}k("label",o.label);k("state",o.state);if(f[i].data){v.populate(f[i].data)}else{y(f[i].file)}e()}function c(z){v.update(z.position)}};a.captions={};a().registerPlugin("captions",b,"./captions.swf")})(jwplayer);(function(a){a.captions.renderer=function(n,f){var m;var e;var i;var g;var l;var j;var d;this.hide=function(){b({display:"none"})};this.populate=function(o){i=-1;m=o;c()};function k(o){e.innerHTML=o;var q=Math.round(d/2-e.clientWidth/2);var p=Math.round(g-e.clientHeight-20);b({left:q+"px",top:p+"px"})}this.resize=function(r,o){g=o;d=r;var q=Math.round(n.fontSize*r/480);var p=Math.round(q*1.4);b({fontSize:q+"px",lineHeight:p+"px"})};function c(){var p=-1;for(var o=0;o<m.length;o++){if(m[o]["begin"]<=j&&(o==m.length-1||m[o+1]["begin"]>=j)){p=o;break}}if(p==-1){k("")}else{if(p!=i){i=p;k(m[o]["text"])}}}function h(){e=document.createElement("div");f.appendChild(e);b({color:n.color,display:"block",fontFamily:n.fontFamily,fontWeight:n.fontWeight,height:"auto",margin:"0 0 0 0",padding:"0 10px",position:"absolute",textAlign:"center",textDecoration:n.textDecoration,whiteSpace:"nowrap",width:"auto"});if(n.back){b({background:"#000"})}else{b({textShadow:"-2px 0px 1px #000,2px 0px 1px #000,0px -2px 1px #000,0px 2px 1px #000,-1px 1px 1px #000,1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000"})}}h();this.show=function(){b({display:"block"})};function b(o){for(var p in o){e.style[p]=o[p]}}this.update=function(o){j=o;if(m){c()}}}})(jwplayer);(function(a){a.captions.selector=function(d,c){this.hide=function(){};this.populate=function(e,f){};this.resize=function(f,e){};this.show=function(){};function b(e,f){for(var g in f){e.style[g]=f[g]}}}})(jwplayer);(function(a){a.captions.srt=function(g,b){var d;var c;function h(k){if(k==0){b("Crossdomain loading denied: "+c)}else{if(k==404){b("SRT File not found: "+c)}else{b("Error "+k+" loading SRT file: "+c)}}}this.load=function(l){c=l;try{d.open("GET",l,true);d.send(null)}catch(k){b("Error loading SRT File: "+l)}};function f(n){_captions=[{begin:0,text:""}];n=n.replace(/^\s+/,"").replace(/\s+$/,"");var m=n.split("\r\n\r\n");if(m.length==1){m=n.split("\n\n")}for(var k=0;k<m.length;k++){var l=j(m[k]);if(l.begin&&l.text){_captions.push(l);if(l.end){_captions.push({begin:l.end,text:""});delete l.end}}}if(_captions.length>1){g(_captions)}else{b("Invalid SRT file: "+c)}}function j(o){var n={};var p=o.split("\r\n");if(p.length==1){p=o.split("\n")}try{var l=p[1].indexOf(" --> ");if(l>0){n.begin=i(p[1].substr(0,l));n.end=i(p[1].substr(l+5))}if(p[2]){n.text=p[2];for(var m=3;m<p.length;m++){n.text+="<br/>"+p[m]}}}catch(k){}return n}function i(k){k=k.replace(",",".");var m=k.split(":");var l=0;if(k.substr(-1)=="s"){l=Number(k.substr(0,k.length-1))}else{if(k.substr(-1)=="m"){l=Number(k.substr(0,k.length-1))*60}else{if(k.substr(-1)=="h"){l=Number(k.substr(0,k.length-1))*3600}else{if(m.length>1){l=Number(m[m.length-1]);l+=Number(m[m.length-2])*60;if(m.length==3){l+=Number(m[m.length-3])*3600}}else{l=Number(k)}}}}return l}function e(){d=new XMLHttpRequest();d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200){f(d.responseText)}else{h(d.status)}}}}e()}})(jwplayer); 
     1(function(a){var b=function(d,h,t){var i;var n=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA6ZJREFUeNrsWM9LVFEUfm8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wNWVDiSt0qmjnBtF2o2r/1pcFnHGVhLALdi/o+3JXAPxM7VK1H4hQS2wOe2SzYqNl7agMl8qiCnnZ0T2Gu0eVrs3jf56BlLH+iqzOUox+BIvYVjZ1uS1DPUoUSZA/TLXtSv7a8vYSonTW4haS+QpiLrYO+A8+KBsZ8Blj/vXgh4/RWO2B6shThE3mQLPuAnOcgo1c+qFXBKELOznLP+lzD8kuzvLfzcZxvRrCCqQXh6syrgbr4QsHqwQSHtQgUR4hK0i2/jmt7It9VQ5T5AlDDjMZBJiHZXJbHMcuRQdlaNukkiBOQo+/+1R14oVK/nbJBvljL5a/PFTa10Cu9fa6MjXk9alRmgpG45uY6Gc76Nj4sQI2yKtLrYd/K7VR92q7jGg+jsKGYh8WLutHK5zsR1Qzss1A+oeneravkIedROgTd4o9DkPmybszv08u4huUv89oU4W+syepGNtLFXibjaZtUGdXE1ZKyNxjkqlqplMkY/cCU6vBNurJpBBOh2j7mJ/zMU2Rvsu6phxj8zIDtod2ooVK1b+KfkjwAC9JXx/mwsoAgAAAABJRU5ErkJggg=="];var q={back:false,color:"#FFFFFF",fontFamily:"Arial,sans-serif",fontSize:15,fontStyle:"normal",fontWeight:"normal",state:true,textDecoration:"none"};var x;var A;var w;var j;var f=[];function l(C,F){C="jwplayercaptions"+C;if(F!==undefined){var G=C+"="+F+"; expires=Wed, 1 Jan 2020 00:00:00 UTC; path=/";document.cookie=G}else{var E=document.cookie.split(";");for(var D=0;D<E.length;D++){var G=E[D];while(G.charAt(0)==" "){G=G.substring(1,G.length)}if(G.indexOf(C)==0){return G.substring(C.length+1,G.length)}}}return null}var z=function(){if(f.length>1){A.show();x.hide();try{d.getPlugin("display").hide();d.getPlugin("dock").hide()}catch(C){}}else{if(f.length==1){q.state=!q.state;l("state",q.state);e()}}};function r(C){console.log("CAPTIONS("+C+")")}function p(C){x.resize(i[0],Math.round(i[1]*0.94))}function o(C){w="idle";e()}function s(C){j=0;f=[];x.update(0);A.hide();try{d.getPlugin("display").show();d.getPlugin("dock").show()}catch(H){}try{d.getPlugin("display").show();d.getPlugin("dock").show()}catch(H){}var J=d.getPlaylist()[C.index];if(J["captions.files"]){var L=false;var D=J["captions.files"].split(",");if(J["captions.labels"]){var G=J["captions.labels"].split(",")}for(var F=0;F<D.length;F++){var I={file:D[F]};if(G&&G[F]){I.label=G[F]}else{I.label=D[F].substring(D[F].lastIndexOf("/")+1,D[F].indexOf(".")-1)}if(q.label==I.label){L=true;j=f.length;B(I.file)}f.push(I)}if(L==false){q.state=false}var K=[{label:"(Off)"}];for(var E=0;E<f.length;E++){K.push({label:f[E].label})}if(q.state){A.populate(K,j+1)}else{A.populate(K,0)}}else{if(J["captions.file"]){f.push({file:J["captions.file"]});B(f[0].file)}}e()}function B(D){var C=new a.captions.srt(v,r);C.load(D)}function v(C){x.populate(C);f[j].data=C;e()}function k(C){w="playing";e()}function u(C){if(q.file){d.getPlaylist()[0]["captions.file"]=q.file}if(q.files){d.getPlaylist()[0]["captions.files"]=q.files}if(q.labels){d.getPlaylist()[0]["captions.labels"]=q.labels}}function e(){if(!f.length){d.getPlugin("dock").setButton("captions",z,n[0]);x.hide()}else{if(q.state){d.getPlugin("dock").setButton("captions",z,n[2]);if(w=="playing"){x.show()}else{x.hide()}}else{d.getPlugin("dock").setButton("captions",z,n[1]);x.hide()}}}this.resize=function(D,C){if(d.getRenderingMode()=="flash"){return}A.resize(D,C);x.resize(D,Math.round(C*0.94));i=[D,C]};function g(){if(d.getRenderingMode()=="flash"){return}d.onPlaylist(u);d.onPlaylistItem(s);d.onIdle(o);d.onPlay(k);d.onTime(c);try{d.getPlugin("controlbar").onHide(p);d.getPlugin("controlbar").onShow(y)}catch(C){}if(l("state")!==null){if(l("state")=="true"){q.state=true}else{q.state=false}}if(l("label")!==null){q.label=l("label")}for(var D in h){q[D]=h[D]}x=new a.captions.renderer(q,t);A=new a.captions.selector(m,t);e()}d.onReady(g);function m(D){A.hide();try{d.getPlugin("display").show();d.getPlugin("dock").show()}catch(C){}if(D>0){q.state=true;j=D-1;q.label=f[j].label}else{q.state=false}l("label",q.label);l("state",q.state);if(f[j].data){x.populate(f[j].data)}else{B(f[j].file)}e()}function y(C){var D=C.boundingRect.y;if(D>0){x.resize(i[0],Math.round(D*0.94))}}function c(C){x.update(C.position)}};a.captions={};a().registerPlugin("captions",b,"./captions.swf")})(jwplayer);(function(a){a.captions.renderer=function(p,g){var i;var o;var f;var j;var n;var k;var b="visible";var e;this.hide=function(){c({display:"none"})};this.populate=function(q){j=-1;o=q;d()};function l(q){f.innerHTML=q;if(q==""){b="hidden"}else{b="visible"}setTimeout(m,10,false)}this.resize=function(r,q){e=r;i=q;m(true)};function m(u){var t=Math.round(e/2-f.clientWidth/2);var s=Math.round(i-f.clientHeight);var r=Math.round(p.fontSize*Math.pow(e/400,0.6));var q=Math.round(r*1.4);if(u){c({webkitTransition:"top 150ms ease",MozTransition:"top 150ms ease",oTransition:"top 150ms ease",transition:"top 150ms ease"})}else{c({webkitTransition:"none",MozTransition:"none",oTransition:"none",transition:"none"})}c({fontSize:r+"px",left:t+"px",lineHeight:q+"px",top:s+"px",visibility:b})}function d(){var r=-1;for(var q=0;q<o.length;q++){if(o[q]["begin"]<=k&&(q==o.length-1||o[q+1]["begin"]>=k)){r=q;break}}if(r==-1){l("")}else{if(r!=j){j=r;l(o[q]["text"])}}}function h(){f=document.createElement("div");g.appendChild(f);c({color:"#"+p.color.substr(-6),display:"block",fontFamily:p.fontFamily,fontStyle:p.fontStyle,fontWeight:p.fontWeight,height:"auto",margin:"0 0 0 0",padding:"3px 9px",position:"absolute",textAlign:"center",textDecoration:p.textDecoration,whiteSpace:"nowrap",width:"auto"});if(p.back){c({background:"#000"})}else{c({textShadow:"-2px 0px 1px #000,2px 0px 1px #000,0px -2px 1px #000,0px 2px 1px #000,-1px 1px 1px #000,1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000"})}}h();this.show=function(){c({display:"block"})};function c(q){for(var r in q){f.style[r]=q[r]}}this.update=function(q){k=q;if(o){d()}}}})(jwplayer);(function(a){a.captions.selector=function(p,i){var n;var h;var d;var b;var j;var o=[];function m(s){var q=0;for(var r=0;r<o.length;r++){if(s.target==o[r].button){q=r;break}}f(o[n].button,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAABCAYAAAB3yoT0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC5JREFUeNpi/P//PxMDAwM7EuZA4+PC6OpYGEbBKCAf/APinzjwDzxyKGoAAgwAImkVA8XMdAAAAAAASUVORK5CYII=) no-repeat top left"});f(o[q].button,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASlJREFUeNrsVU1vwjAMrTOqCcalTLtyYj+SX8Cf5LQrYlxYK1RIcKQXybLyVbbDDlh6SiS778WJ7TbN0wpGNUHOuWgcEblfCYCYErGB3OWEqHBio0CC3CpEM5plEjDwtwIGPk84ClyDSFEApw/kr4wF4w1rizBP2jN+sHq78rdWZzFLXJsBmSddMd4ZHWOOmIFxYhxFRhZXlxZQd9/i5J78k7FlbODfM3bYXwCf1c1zyCxMRQadIm+w38K3EO9DsYdsCiJzRS5F1jnynECtHUoBKQEnSnHAnWvbwzeKB64SkOQ9qmWnRMIjnxCTFKFIH3jRF/TAMlKmH4wvUabfjDMq6cYVZEsCjzTaJXSzbrTcLJo8KqbOIitmzFgz7P7PuP7LH87TinYXYABVOIZoLrBbUwAAAABJRU5ErkJggg==) no-repeat 20px 0"});p(q);n=q}function c(q){if(q.target==h||q.target==d){p(n)}}this.hide=function(){h.style.opacity=0;setTimeout(function(){h.style.display="none"},200)};function g(q){f(q.target,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAAYCAYAAABTE9enAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOJJREFUeNrs3NEKgzAMQFE7/P9fztjLqNJsWrsy5FwYwzYmrb34FktELBVl2fLt+sp9PTE9tWau+UitaMwfGTt73Zu3t9bMNae51sYDL9X/frw0YrLYETlKsr4r9Ubk6Nl36yCi+u3nI4kdneNT7IgcMWnfr2cca+NNUpJDPzs3IsedamcHFMlhno37xdw/126+sR8LcCMIDUIDhAYIDRAahAYIDRAaIDRAaBAaIDRAaIDQAKFBaIDQAKGBsex7Cj9112qS1STbkyMm7vst9KZzthrzGYPxtXzG4Pqa01xPAQYALYzIMaVqNUoAAAAASUVORK5CYII=) no-repeat top left"})}function e(q){f(q.target,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAABCAYAAAB3yoT0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC5JREFUeNpi/P//PxMDAwM7EuZA4+PC6OpYGEbBKCAf/APinzjwDzxyKGoAAgwAImkVA8XMdAAAAAAASUVORK5CYII=) no-repeat top left"})}this.populate=function(r,u){o=r;n=u;j.innerHTML="";for(var t=0;t<r.length;t++){var s=document.createElement("li");s.innerHTML=r[t].label;o[t].button=s;j.appendChild(s);f(s,{cursor:"pointer",display:"block",font:"12px/24px Arial,sans-serif",fontWeight:"bold",textShadow:"1px 1px 0 #000",textAlign:"center",width:"180px"});var q=t;s.onclick=m;s.onmouseover=g;s.onmouseout=e;f(s,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAABCAYAAAB3yoT0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAC5JREFUeNpi/P//PxMDAwM7EuZA4+PC6OpYGEbBKCAf/APinzjwDzxyKGoAAgwAImkVA8XMdAAAAAAASUVORK5CYII=) no-repeat top left"});if(t==n){f(s,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASlJREFUeNrsVU1vwjAMrTOqCcalTLtyYj+SX8Cf5LQrYlxYK1RIcKQXybLyVbbDDlh6SiS778WJ7TbN0wpGNUHOuWgcEblfCYCYErGB3OWEqHBio0CC3CpEM5plEjDwtwIGPk84ClyDSFEApw/kr4wF4w1rizBP2jN+sHq78rdWZzFLXJsBmSddMd4ZHWOOmIFxYhxFRhZXlxZQd9/i5J78k7FlbODfM3bYXwCf1c1zyCxMRQadIm+w38K3EO9DsYdsCiJzRS5F1jnynECtHUoBKQEnSnHAnWvbwzeKB64SkOQ9qmWnRMIjnxCTFKFIH3jRF/TAMlKmH4wvUabfjDMq6cYVZEsCjzTaJXSzbrTcLJo8KqbOIitmzFgz7P7PuP7LH87TinYXYABVOIZoLrBbUwAAAABJRU5ErkJggg==) no-repeat 20px 0"})}}l()};this.resize=function(r,q){b=[r,q];l()};function l(){f(h,{height:b[1]+"px",width:b[0]+"px"});f(d,{left:(b[0]-50)+"px"});f(j,{left:Math.round(b[0]/2-90)+"px",top:Math.round(b[1]/2-o.length*12)+"px"})}function k(){h=document.createElement("div");h.onclick=c;i.appendChild(h);f(h,{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAGQCAYAAACJccGfAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJlJREFUeNrskksKwDAIRFV6/+v1Nv0sQymkBD+jVchGdOY5hIlop6GEHrXd75hOnNqNIA5Y0cQaPisLGiZgQbbzFdhrS0/ksUUhhb02aKW0Rh6w0i55OCqRdmLd6Mb4C7nzKJkYCqkPh4nLv0QXNIJsg9BRVkpz+Nj6oKOQ+qSuYZuH9HVCcka4qCEgiYnLtWze+Garfu0lwAArHE4YPfyZuAAAAABJRU5ErkJggg==)",backgroundRepeat:"no-repeat",backgroundSize:"100% 100%",cursor:"pointer",display:"none",opacity:0,position:"relative",webkitTransition:"opacity 150ms linear",MozTransition:"opacity 150ms linear",oTransition:"opacity 150ms linear",transition:"opacity 150ms linear"});d=document.createElement("div");d.onclick=c;h.appendChild(d);f(d,{background:"transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xJREFUeNrsVz1IW1EUjtKtQyh0yRQr2kFCIlHB7cUMBhpCXKKY5UVBnfwZWgUppFvHOEUkg84ucXBxeg1ChiKmUCQ0EV+K1Q4BnyKImujtOem95fp8pvTHeIX7weHlnXNeON+955x7rs0mISEhISEhISEh0UgQQoIgOyBvfuPnBvkM8lZEEiHCYWpqioA6buHnrVQqVeY3MzODfglhiFxfX1eICX19fRikypF4fnV1VTX7oQnELgSR9fX198QC/f39p2D2wM+nZ2dnJbN9aGiIEVFE2RRlcHCQwIrfIjMxMVG+vLz8aNZHIhFGQigimBqK1+vNn5yckHo4Pz8n4McI5EQicYNQR0fHzt7eniWJ3d1d4na7eRJ2m8Cw+/3+L1ZEVFV9NCSwOz07PDwsWhEBPenu7r7RzUQl8bJarX6tVyMXFxckEAgUhN0RiNEP58mNtgUtl8RiMbK/v3+L0MjIiC4cGYjrlTlQbMVdXV21mnA6neTo6OguMuIAVv67Ocienh5W2Bis4nK5vlmlmlDnyNLS0ms+uPHxcRaggSc7dfOEQqFT3m92dla8AxGCJNvb23xwKGGTnxoMBkmhUCDz8/O8n1C1kuACs5x+KeImv4RNQkLiUd3ZNZAHaaPN//sPfT7fh4c4E5r/YfXjIAY91xJ17CjTnD5Bv9FBwlRnp7tJ6NPTqBTCO7gOc9Rya2uroes66e3txQA1RVHI5OTktNlOdQoI3kMSeC+Zm5vDUz8MujQckEhWQ30+n89x08C9EolvbGyk6QzlpKJDMDoSWV1d1Xg7+gOIgkbYoVwuhys/3dbWhsEjQTzp9a2tLYPtDOjTfxLTk78lk81mB+DxDgTvHs6mpqYX7e3tGry3mO3sm0wm40P74uJiaXh4eKFYLJbgu07QLYyNjbWwMqPPgUbUyBrcMWywwLX8xndN036NI5ubm7wddysGxNZGR0cxuBWHw9GZTCYXjo+PMfhP+D00iRrRaDS6kkqlShyhe08v1TB+1vrBwcEy3sGBDKZPbZLFdKJ2A1IG7TpNLVbUBqQgNgl08pTL5RxrApFIBPVaI7ueSsd0fvDTuPYbp3aDGyDt1IeN+Ozu7uH0ekOKXUJCQkJCguKHAAMAvduPUQLB93IAAAAASUVORK5CYII=)",cursor:"pointer",position:"absolute",left:"0px",top:"0px",margin:"0px",padding:"0px",display:"block",width:"50px",height:"50px"});j=document.createElement("ul");h.appendChild(j);f(j,{display:"block",height:"auto",listStyle:"none",margin:"0px",padding:"0px",position:"absolute",width:"180px"})}k();this.show=function(){h.style.display="block";setTimeout(function(){h.style.opacity=1},20)};function f(q,r){for(var s in r){q.style[s]=r[s]}}}})(jwplayer);(function(a){a.captions.srt=function(g,b){var d;var c;function h(k){if(k==0){b("Crossdomain loading denied: "+c)}else{if(k==404){b("SRT File not found: "+c)}else{b("Error "+k+" loading SRT file: "+c)}}}this.load=function(l){c=l;try{d.open("GET",l,true);d.send(null)}catch(k){b("Error loading SRT File: "+l)}};function f(n){_captions=[{begin:0,text:""}];n=n.replace(/^\s+/,"").replace(/\s+$/,"");var m=n.split("\r\n\r\n");if(m.length==1){m=n.split("\n\n")}for(var k=0;k<m.length;k++){var l=j(m[k]);if(l.begin&&l.text){_captions.push(l);if(l.end){_captions.push({begin:l.end,text:""});delete l.end}}}if(_captions.length>1){g(_captions)}else{b("Invalid SRT file: "+c)}}function j(o){var n={};var p=o.split("\r\n");if(p.length==1){p=o.split("\n")}try{var l=p[1].indexOf(" --> ");if(l>0){n.begin=i(p[1].substr(0,l));n.end=i(p[1].substr(l+5))}if(p[2]){n.text=p[2];for(var m=3;m<p.length;m++){n.text+="<br/>"+p[m]}}}catch(k){}return n}function i(k){k=k.replace(",",".");var m=k.split(":");var l=0;if(k.substr(-1)=="s"){l=Number(k.substr(0,k.length-1))}else{if(k.substr(-1)=="m"){l=Number(k.substr(0,k.length-1))*60}else{if(k.substr(-1)=="h"){l=Number(k.substr(0,k.length-1))*3600}else{if(m.length>1){l=Number(m[m.length-1]);l+=Number(m[m.length-2])*60;if(m.length==3){l+=Number(m[m.length-3])*3600}}else{l=Number(k)}}}}return l}function e(){d=new XMLHttpRequest();d.onreadystatechange=function(){if(d.readyState===4){if(d.status===200){f(d.responseText)}else{h(d.status)}}}}e()}})(jwplayer); 
  • plugins/captions/doc/guide.html

    r1973 r1979  
    3030<p><img src="assets/captions_example.png" alt="A screenshot of example captions implementation" style="margin-left:15px"/></p> 
    3131 
    32 <p>Captions are read from external files, in the SRT (SubRip) text format or the DFXP (W3C TimedText) XML format. Captions are also read from MP4 videos (3GPP Timed Text). The plugin works in both Flash and HTML5, but there are certain restrictions.</p> 
     32<p>Captions are read from external files, in the SRT (SubRip) text format or the DFXP (W3C TimedText) XML format. Captions are also read from MP4 videos (3GPP Timed Text). The plugin works in both Flash and HTML5, but there are certain format/device restrictions (see below).</p> 
    3333 
    3434<p>The plugin can load multiple subtitle tracks per video, in which case a selection menu is presented. It also supports <a href="http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12537/xml-playlist-support">playlists</a> and styling of the captions with CSS properties.</p> 
     
    133133</pre> 
    134134 
    135 <p><em>Note your SRT files should be saved using <strong>UTF8</strong> encoding in order to correctly display special characters (accents, but also e.g. Arab, Chinese, Russian).</em></p> 
     135<p><em>Note your DFXP files should be saved using <strong>UTF8</strong> encoding in order to correctly display special characters (accents, but also e.g. Arab, Chinese, Russian).</em></p> 
    136136 
    137137<h3>MP4 (3GPP Text Tracks)</h3> 
     
    160160</dl> 
    161161 
    162 <p>When a viewer changes the captions track, the value is saved in a cookie. That way the viewer won't have to re-set the track with every new video or page reload.<p> 
     162<p>When a viewer changes the captions track, the value is saved in a cookie. That way the viewer won't have to re-set the track with every new video or page reload. You can override this cookied value by setting another option called <strong>label</strong>. Set it to the label of the track you want pre-selected.<p> 
     163 
     164<p><em>Note you can also set the <strong>labels</strong> option to override the default MP4 track labels.</em></p> 
    163165 
    164166<h3>Example</h3> 
     
    186188&lt;/script&gt; 
    187189</pre> 
     190 
     191<p><em>Note the selection menu cannot scroll (yet) if there are too many languages. Work around this issue by offering a language selection outside the player or use browser info for pre-selecting a few languages.</em></p> 
    188192 
    189193 
     
    311315<li>Made captions aware of controlbar in the "over" state. For player 5.7+, the captions will now scroll up if the controlbar shows and scroll down again if the controlbar hides.</li> 
    312316<li>Added a timed transition to showing/hiding of the language selector.</li> 
     317<li>Added support for overriding the MP4 language labels with the "labels" option.</li> 
    313318<li>Added a close button to the language selector menu.</li> 
    314319<li>Added support for displaying filenames in language selector if labels are not shown.</li> 
     320<li>Added support for forcing a pre-set language through the "label" option.</li> 
     321<li>Enhanced scaling of the captions. For larger dimensions, they're now scaled relatively smaller.</li> 
    315322</ul> 
    316323<ul> 
     
    319326</ul> 
    320327<ul> 
    321 <li>Deprecated skinning the captions toggle (no skinning in HTML5).</li> 
    322 <li>Deprecated placing the toggle in the controlbar (no custom controlbar buttons in HTML5).</li> 
     328<li>Deprecated skinning the captions toggle (no skinning in HTML5). The feature still works, but only in Flash.</li> 
     329<li>Deprecated placing the toggle in the controlbar (no custom controlbar buttons in HTML5). The feature still works, but only in Flash.</li> 
    323330</ul> 
    324331 
  • plugins/captions/src/as/com/longtailvideo/plugins/captions/Captions.as

    r1973 r1979  
    2626        /** Reference to the controlbar/dock button. **/ 
    2727        private var _button:MovieClip; 
     28        /** Save the last resize dimensions. **/ 
     29        private var _dimensions:Array; 
    2830        /** List with configuration options. **/ 
    2931        private var _config:Object = { 
     
    5052        /** Reference to dock/controlbar icon. **/ 
    5153        private var _icon:DisplayObject; 
     54        /** Currently active playlist item. **/ 
     55        private var _item:Object; 
    5256        /** XML connect and parse object. **/ 
    5357        private var _loader:URLLoader; 
     
    8185        /** The controlbar is hiding. **/ 
    8286        private function _barHideHandler(evt:Event):void { 
    83             if (!_player.config.fullscreen) { 
    84                 _easer.easeY(_config.height-20); 
    85             } 
     87            _easer.easeY(Math.round(_dimensions[1]*0.94)); 
    8688        }; 
    8789 
     
    8991        /** The controlbar is showing. **/ 
    9092        private function _barShowHandler(evt:Event):void { 
    91             if(evt['boundingRect'].width > 0 && !_player.config.fullscreen) { 
    92                 _easer.easeY(evt['boundingRect'].y-10); 
     93            var yps:Number = evt['boundingRect'].y; 
     94            if(yps > 0) { 
     95                _easer.easeY(Math.round(yps * 0.94)); 
    9396            } 
    9497        }; 
     
    180183            _tracks = new Array(); 
    181184            _renderer.setPosition(0); 
    182             var item:Object = _player.playlist.currentItem; 
    183             if(item['captions.files']) { 
     185            _item = _player.playlist.currentItem; 
     186            if(_item['captions.files']) { 
    184187                // Load multiple captions 
    185                 var files:Array = item['captions.files'].split(','); 
     188                var files:Array = _item['captions.files'].split(','); 
    186189                var found:Boolean = false; 
    187                 if(item['captions.labels']) { 
    188                     var labels:Array = item['captions.labels'].split(','); 
     190                if(_item['captions.labels']) { 
     191                    var labels:Array = _item['captions.labels'].split(','); 
    189192                } 
    190193                for(var i:Number = 0; i < files.length; i++) { 
     
    207210                if(found == false) { _config.state = false; } 
    208211                _populateSelector(); 
    209             } else if(item['captions.file']) { 
     212            } else if(_item['captions.file']) { 
    210213                // Load single caption 
    211                 _tracks.push({file:item['captions.file']}); 
    212                 _loader.load(new URLRequest(item['captions.file'])); 
     214                _tracks.push({file:_item['captions.file']}); 
     215                _loader.load(new URLRequest(_item['captions.file'])); 
    213216            } 
    214217            _redraw(); 
     
    264267                        label: ISO639.label(info[i].language) 
    265268                    }); 
     269                    // Override the ISO codes with labels 
     270                    if(_item['captions.labels']) { 
     271                        var index:Number = _tracks.length - 1; 
     272                        _tracks[index].label = _item['captions.labels'].split(',')[index]; 
     273                    } 
    266274                } 
    267275            } 
     
    347355 
    348356 
    349         /** Resize this plugin */ 
     357        /** Resize the captions, relatively smaller as the screen grows */ 
    350358        public function resize(width:Number, height:Number):void { 
    351         // Resize the captions, a bit smaller in fullscreen 
    352             if(_player.config.fullscreen) { 
    353                 _renderer.x = width / 8; 
    354                 _renderer.width = width * 3 / 4; 
    355             } else { 
    356                 _renderer.x = width / 24; 
    357                 _renderer.width = width * 11 / 12; 
    358             } 
     359            _dimensions = new Array(width,height); 
     360            _renderer.width = Math.round(400 * Math.pow(width/400,0.6)); 
     361            _renderer.x = Math.round(width/2 -_renderer.width/2); 
    359362            _renderer.scaleY = _renderer.scaleX; 
    360             // Position the captions, taking controls into account. 
    361             if (_player.config.fullscreen) { 
    362                 _renderer.y = height - 70; 
    363             } else if (_player.config.controlbar == 'over') { 
    364                 _renderer.y = height - 50; 
    365             } else { 
    366                 _renderer.y = height - 20; 
    367             } 
     363            _renderer.y = Math.round(height * 0.94); 
    368364            _selector.resize(width,height); 
    369365        }; 
  • plugins/captions/src/as/com/longtailvideo/plugins/captions/ISO639.as

    r1973 r1979  
    1919            cze: 'Czech', 
    2020            dan: 'Danish', 
    21             deu: 'Deutsch', 
     21            deu: 'German', 
    2222            dut: 'Dutch', 
    2323            eng: 'English', 
    24             esp: 'Español', 
     24            esp: 'Spanish', 
    2525            est: 'Estonian', 
    2626            fil: 'Filipino', 
    2727            fin: 'Finnish', 
    28             fra: 'Français', 
     28            fra: 'French', 
    2929            fre: 'French', 
    3030            geo: 'Georgian', 
     
    4949            may: 'Malay', 
    5050            mlt: 'Maltese', 
    51             nor: 'Norske', 
     51            nor: 'Norwegian', 
    5252            per: 'Persian', 
    5353            pol: 'Polish', 
  • plugins/captions/src/js/captions.js

    r1973 r1979  
    66 
    77 
     8        /** Dimensions of the display. **/ 
     9        var _dimensions; 
     10        /** Dock icons. **/ 
     11        var _icons = [ 
     12            '../assets/not_set.png', 
     13            '../assets/is_off.png', 
     14            '../assets/is_on.png' 
     15        ]; 
    816        /** Default configuration options. **/ 
    917        var _options = { 
     
    1725            textDecoration: 'none' 
    1826        }; 
    19         /** Dock icons. **/ 
    20         var _icons = [ 
    21             '../assets/not_set.png', 
    22             '../assets/is_off.png', 
    23             '../assets/is_on.png' 
    24         ]; 
    2527        /** Reference to the text renderer. **/ 
    2628        var _renderer; 
    2729        /** Reference to the language selector. **/ 
    2830        var _selector; 
     31        /** Current player state. **/ 
     32        var _state; 
    2933        /** Currently active captions track. **/ 
    3034        var _track; 
    3135        /** List with all tracks. **/ 
    3236        var _tracks = []; 
    33         /** Current player state. **/ 
    34         var _state; 
    3537 
    3638 
     
    6264            if(_tracks.length > 1) { 
    6365                _selector.show(); 
     66                _renderer.hide(); 
    6467                try { 
    6568                    _player.getPlugin('display').hide(); 
     
    7780        function _errorHandler(error) { 
    7881            console.log("CAPTIONS(" + error + ")"); 
     82        }; 
     83 
     84 
     85        /** Controlbar is hiding. **/ 
     86        function _hideHandler(event) { 
     87            _renderer.resize(_dimensions[0],Math.round(_dimensions[1]*.94)); 
    7988        }; 
    8089 
     
    97106                _player.getPlugin('dock').show(); 
    98107            } catch (error) {} 
     108            try { 
     109                _player.getPlugin('display').show(); 
     110                _player.getPlugin('dock').show(); 
     111            } catch (error) {} 
    99112            var item = _player.getPlaylist()[event.index]; 
    100113            // Load multiple captions 
     
    102115                var found = false; 
    103116                var files = item['captions.files'].split(','); 
    104                 if(item['captions.labels']) {  
     117                if(item['captions.labels']) { 
    105118                    var labels = item['captions.labels'].split(','); 
    106119                } 
     
    197210        }; 
    198211 
     212 
    199213        /** Reposition elements upon a resize. **/ 
    200214        this.resize = function(width,height) { 
    201215            if(_player.getRenderingMode() == 'flash') { return; } 
    202             _renderer.resize(width,height); 
    203216            _selector.resize(width,height); 
     217            _renderer.resize(width,Math.round(height*0.94)); 
     218            _dimensions = [width,height]; 
    204219        }; 
    205220 
     
    214229            _player.onPlay(_playHandler); 
    215230            _player.onTime(_timeHandler); 
     231            try {  
     232                _player.getPlugin('controlbar').onHide(_hideHandler); 
     233                _player.getPlugin('controlbar').onShow(_showHandler); 
     234            } catch (error) {} 
    216235            // Grab cookies and config options 
    217236            if(_cookie('state') !== null) { 
     
    250269                _options.label = _tracks[_track].label; 
    251270            } else { 
    252                 _config.state = false; 
     271                _options.state = false; 
    253272            } 
    254273            _cookie('label',_options.label); 
     
    264283 
    265284 
     285        /** Controlbar is showing. **/ 
     286        function _showHandler(event) { 
     287            var yps = event.boundingRect.y; 
     288            if(yps > 0) {  
     289                _renderer.resize(_dimensions[0],Math.round(yps*.94)); 
     290            } 
     291        }; 
     292 
     293 
    266294        /** Listen to player time updates. **/ 
    267295        function _timeHandler(event) { 
  • plugins/captions/src/js/captions.renderer.js

    r1975 r1979  
    66 
    77 
     8        /** Captions bottom position. **/ 
     9        var _bottom; 
    810        /** Current list with captions. **/ 
    911        var _captions; 
     
    1214        /** Current actie captions entry. **/ 
    1315        var _current; 
    14         /** Height of the display. **/ 
    15         var _height; 
    1616        /** Height of a single line. **/ 
    1717        var _line; 
    1818        /** Current video position. **/ 
    1919        var _position; 
     20        /** Should the captions be visible or not. **/ 
     21        var _visible = 'visible'; 
    2022        /** Width of the display. **/ 
    2123        var _width; 
     
    3941        function _render(html) { 
    4042            _container.innerHTML = html; 
    41             var left = Math.round(_width/2 - _container.clientWidth/2); 
    42             var top = Math.round(_height - _container.clientHeight - 20); 
    43             _style({ 
    44                 left: left + 'px', 
    45                 top: top + 'px' 
    46             }); 
     43            if(html == '') {  
     44                _visible = 'hidden'; 
     45            } else {  
     46                _visible = 'visible'; 
     47            } 
     48            setTimeout(_resize,10,false); 
     49        }; 
     50 
     51 
     52        /** Store new dimensions. **/ 
     53        this.resize = function(width,bottom) { 
     54            _width = width; 
     55            _bottom = bottom; 
     56            _resize(true); 
    4757        }; 
    4858 
    4959 
    5060        /** Resize the captions. **/ 
    51         this.resize = function(width,height) { 
    52             _height = height; 
    53             _width = width; 
    54             var size = Math.round(_options.fontSize*width/480); 
     61        function _resize(transition) { 
     62            var left = Math.round(_width/2 - _container.clientWidth/2); 
     63            var top = Math.round(_bottom - _container.clientHeight); 
     64            var size = Math.round(_options.fontSize * Math.pow(_width/400,0.6)); 
    5565            var line = Math.round(size * 1.4); 
     66            if(transition) { 
     67                _style({ 
     68                    webkitTransition: 'top 150ms ease', 
     69                    MozTransition: 'top 150ms ease', 
     70                    oTransition: 'top 150ms ease', 
     71                    transition: 'top 150ms ease' 
     72                }); 
     73            } else { 
     74                _style({ 
     75                    webkitTransition: 'none', 
     76                    MozTransition: 'none', 
     77                    oTransition: 'none', 
     78                    transition: 'none' 
     79                }); 
     80            } 
    5681            _style({ 
    5782                fontSize: size + 'px', 
    58                 lineHeight: line + 'px' 
     83                left: left + 'px', 
     84                lineHeight: line + 'px', 
     85                top: top + 'px', 
     86                visibility: _visible 
    5987            }); 
    6088        }; 
     
    86114            _div.appendChild(_container); 
    87115            _style({ 
    88                 color: _options.color, 
     116                color: '#'+_options.color.substr(-6), 
    89117                display: 'block', 
    90118                fontFamily: _options.fontFamily, 
     119                fontStyle: _options.fontStyle, 
    91120                fontWeight: _options.fontWeight, 
    92121                height: 'auto', 
    93122                margin: '0 0 0 0', 
    94                 padding: '0 10px', 
     123                padding: '3px 9px', 
    95124                position: 'absolute', 
    96125                textAlign: 'center', 
  • plugins/captions/src/js/captions.selector.js

    r1973 r1979  
    55    jwplayer.captions.selector = function(_callback,_div) { 
    66 
     7        /** Currently active item. **/ 
     8        var _active; 
     9        /** Reference to the container div. **/ 
     10        var _container; 
     11        /** Reference to the close button. **/ 
     12        var _close; 
     13        /** Dimensions of the display. **/ 
     14        var _dimensions; 
     15        /** Reference to the track listing. **/ 
     16        var _list; 
     17        /** The list with options. **/ 
     18        var _options = []; 
     19 
     20 
     21        /** One of the buttons was clicked. **/ 
     22        function _clickHandler(event) { 
     23            var index = 0; 
     24            for(var i=0; i<_options.length; i++) { 
     25                if(event.target == _options[i].button) {  
     26                    index = i; 
     27                    break; 
     28                } 
     29            } 
     30            _style(_options[_active].button,{  
     31                background: 'transparent url(../assets/divider.png) no-repeat top left' 
     32            }); 
     33            _style(_options[index].button,{  
     34                background: 'transparent url(../assets/active.png) no-repeat 20px 0' 
     35            }); 
     36            _callback(index); 
     37            _active = index; 
     38        }; 
     39 
     40 
     41        /** Close button or container are clicked. **/ 
     42        function _closeHandler(event) { 
     43            if(event.target == _container || event.target == _close) {  
     44                _callback(_active); 
     45            } 
     46        }; 
     47 
    748 
    849        /** Hide the language selector. **/ 
    9         this.hide = function() {}; 
     50        this.hide = function() { 
     51            _container.style.opacity = 0; 
     52            setTimeout(function(){ 
     53                _container.style.display = 'none'; 
     54            },200); 
     55        }; 
     56 
     57 
     58        /** Swap background on mouse over. **/ 
     59        function _overHandler(event) { 
     60            _style(event.target,{  
     61                background: 'transparent url(../assets/back.png) no-repeat top left' 
     62            }); 
     63        }; 
     64 
     65 
     66        /** Restore background on mouse out. **/ 
     67        function _outHandler(event) { 
     68            _style(event.target,{ 
     69                background: 'transparent url(../assets/divider.png) no-repeat top left' 
     70            }); 
     71        }; 
    1072 
    1173 
    1274        /** Polulate the selector with a list of options. **/ 
    13         this.populate = function(options, active) {}; 
     75        this.populate = function(options, active) { 
     76            _options = options; 
     77            _active = active; 
     78            _list.innerHTML = ''; 
     79            for(var i=0; i<options.length; i++) {  
     80                var button = document.createElement('li'); 
     81                button.innerHTML = options[i].label; 
     82                _options[i].button = button; 
     83                _list.appendChild(button); 
     84                _style(button,{ 
     85                    cursor: 'pointer', 
     86                    display:'block', 
     87                    font: '12px/24px Arial,sans-serif', 
     88                    fontWeight: 'bold', 
     89                    textShadow: '1px 1px 0 #000', 
     90                    textAlign: 'center', 
     91                    width: '180px' 
     92                }); 
     93                var idx = i; 
     94                button.onclick = _clickHandler; 
     95                button.onmouseover = _overHandler; 
     96                button.onmouseout = _outHandler; 
     97                _style(button,{ 
     98                    background: 'transparent url(../assets/divider.png) no-repeat top left' 
     99                }); 
     100                if(i == _active) { 
     101                    _style(button,{  
     102                        background: 'transparent url(../assets/active.png) no-repeat 20px 0' 
     103                    }); 
     104                } 
     105            } 
     106            _resize(); 
     107        }; 
    14108 
    15109 
    16110        /** Resize the selector to fit the display. **/ 
    17         this.resize = function(width,height) {}; 
     111        this.resize = function(width, height) { 
     112            _dimensions = [width,height]; 
     113            _resize(); 
     114        }; 
     115 
     116 
     117        /** Resize the selector. **/ 
     118        function _resize() { 
     119            _style(_container,{ 
     120                height: _dimensions[1]+'px', 
     121                width: _dimensions[0]+'px' 
     122            }); 
     123            _style(_close,{ 
     124                left: (_dimensions[0]-50)+'px' 
     125            }); 
     126            _style(_list,{ 
     127                left: Math.round(_dimensions[0]/2 - 90)+'px', 
     128                top: Math.round(_dimensions[1]/2 - _options.length*12)+'px' 
     129            }); 
     130        }; 
     131 
     132 
     133        /** Draw the initial selector graphics. **/ 
     134        function _setup() { 
     135            _container = document.createElement('div'); 
     136            _container.onclick = _closeHandler; 
     137            _div.appendChild(_container); 
     138            _style(_container,{ 
     139                backgroundImage: 'url(../assets/sheet.png)', 
     140                backgroundRepeat: 'no-repeat', 
     141                backgroundSize: '100% 100%', 
     142                cursor: 'pointer', 
     143                display: 'none', 
     144                opacity: 0, 
     145                position: 'relative', 
     146                webkitTransition: 'opacity 150ms linear', 
     147                MozTransition: 'opacity 150ms linear', 
     148                oTransition: 'opacity 150ms linear', 
     149                transition: 'opacity 150ms linear' 
     150            }); 
     151            _close = document.createElement("div"); 
     152            _close.onclick = _closeHandler; 
     153            _container.appendChild(_close); 
     154            _style(_close,{ 
     155                background: 'transparent url(../assets/close.png)', 
     156                cursor: 'pointer', 
     157                position: 'absolute', 
     158                left: '0px', 
     159                top: '0px', 
     160                margin: '0px', 
     161                padding: '0px', 
     162                display: 'block', 
     163                width: '50px', 
     164                height: '50px' 
     165            }); 
     166            _list = document.createElement("ul"); 
     167            _container.appendChild(_list); 
     168            _style(_list,{ 
     169                display: 'block', 
     170                height: 'auto', 
     171                listStyle: 'none', 
     172                margin: '0px', 
     173                padding: '0px', 
     174                position: 'absolute', 
     175                width: '180px' 
     176            }); 
     177        }; 
     178        _setup(); 
    18179 
    19180 
    20181        /** Show the language selector. **/ 
    21         this.show = function() {}; 
     182        this.show = function() { 
     183            _container.style.display = 'block'; 
     184            setTimeout(function(){ 
     185                _container.style.opacity =  1; 
     186            },20); 
     187        }; 
    22188 
    23189 
  • plugins/captions/test/assets/malformed.srt

    r1973 r1979  
    44 
    553 
    6 00:00:13,500 --> 00:00:15,000 
     600:00:13,500 - 00:00:15,000 
    77Are you? 
    88 
    994 
    10 00:00:17,000 --> 00:00:20,000 
     1000:00:17,000 - 00:00:20,000 
    1111Violet, please! 
    1212- I am not your babe! 
    1313 
    14145 
    15 00:00:24,000 --> 00:00:29,000 
     1500:00:24,000 - 00:00:29,000 
    1616You stupid cow, 
    1717look what you gone and done now, ay. 
    1818 
    19196 
    20 00:00:34,000 --> 00:00:36,000 
     2000:00:34,000 - 00:00:36,000 
    2121Vi, please. 
    2222- Leave me alone! 
     
    2525 
    26267 
    27 00:00:36,000 --> 00:00:38,500 
     2700:00:36,000 - 00:00:38,500 
    2828- We need to talk. 
    2929- Jason, are you deaf?! 
    3030 
    31318 
    32 00:00:41,000 --> 00:00:43,000 
     3200:00:41,000 - 00:00:43,000 
    3333What's going on? 
    34  
    35 9 
    36 00:00:43,000 --> 
  • plugins/captions/test/assets/playlist.xml

    r1973 r1979  
    55    <item> 
    66      <title>Coronation Street</title> 
    7       <description>Single, external XML captions.</description> 
     7      <description>Single, external SRT captions.</description> 
    88      <jwplayer:file>http://content.bitsontherun.com/videos/7OCSON1y.mp4</jwplayer:file> 
    99      <jwplayer:image>http://content.bitsontherun.com/thumbs/7OCSON1y-320.jpg</jwplayer:image> 
    10       <jwplayer:captions.file>assets/corrie.xml</jwplayer:captions.file> 
     10      <jwplayer:captions.file>assets/corrie.srt</jwplayer:captions.file> 
    1111    </item> 
    1212 
  • plugins/captions/test/errors.html

    r1973 r1979  
    55<meta charset="UTF-8"> 
    66<script type="text/javascript" src="assets/jwplayer.min.js"></script> 
    7 <title>Single Track</title> 
     7<title>Error Handling</title> 
    88<style> 
    99    body { padding: 50px; font: 13px/20px Arial; background: #EEE; } 
     
    1515<body> 
    1616 
    17 <h2>Single Track</h2> 
     17<h2>Error Handling</h2> 
    1818 
    1919<div id="player"></div> 
     
    2626        plugins: { 
    2727            '../captions.js': { 
    28                 file: file 
     28                file: file, 
     29                fontSize: 20 
    2930            } 
    3031        }, 
     
    4344    <li><a href="javascript:loadPlayer('assets/malformed.srt')">Malformed SRT</a></li> 
    4445    <li><a href="javascript:loadPlayer('assets/malformed.xml')">Malformed DFXP</a></li> 
     46    <li><a href="javascript:loadPlayer('assets/singleline.srt')">Very wide captions</a></li> 
    4547</ul> 
    4648 
    4749 
    48 <p>Test whether the captions are correctly shown and rendered. 
     50<p>Test whether an error shows up in the console.<br> 
     51    It also should be the correct error.<br> 
     52    The display should not show the error. 
    4953</p> 
    5054 
  • plugins/captions/test/index.html

    r1973 r1979  
    2828    <li><a href="compatibility.html">Backward Compatibility</a></li> 
    2929    <li><a href="errors.html">Error Handling</a></li> 
     30    <li><a href="dimensions.html">Various dimensions</a></li> 
     31</ul> 
     32<ul> 
    3033    <li><a href="ova.html">OVA Support</a></li> 
    3134</ul> 
  • plugins/captions/test/modes.html

    r1973 r1979  
    2323function loadPlayer(html5first) { 
    2424    var options = { 
    25         image: 'http://content.bitsontherun.com/thumbs/q1fx20VZ-720.jpg', 
    26         height: 324, 
    27         controlbar: 'bottom', 
     25        image: 'http://content.bitsontherun.com/thumbs/bkaovAYt-480.jpg', 
     26        height: 270, 
     27        levels: [ 
     28            { file: 'http://content.bitsontherun.com/videos/bkaovAYt-injeKYZS.mp4' }, 
     29            { file: 'http://content.bitsontherun.com/videos/bkaovAYt-27m5HpIu.webm' } 
     30        ], 
    2831        plugins: { 
    2932            '../captions.js': { 
    30                 file: 'assets/sintel-eng.txt', 
     33                file: 'assets/bunny-eng.txt', 
    3134                back: true 
    3235            } 
    3336        }, 
    34         width: 640, 
    35         stretching: 'exactfit' 
     37        width: 480 
    3638    }; 
    3739    var html5 = { 
    38         type: 'html5', 
    39         config: { levels: [ 
    40             { file: 'http://content.bitsontherun.com/videos/q1fx20VZ-52qL9xLP.mp4' }, 
    41             { file: 'http://content.bitsontherun.com/videos/q1fx20VZ-27m5HpIu.webm' } 
    42         ] } 
     40        type: 'html5' 
    4341    } 
    4442    var flash = {  
    4543        type: 'flash', 
    46         src: 'assets/player.swf', 
    47         config: { file: 'http://content.bitsontherun.com/jwp/q1fx20VZ.xml' } 
     44        src: 'assets/player.swf' 
    4845    } 
    4946    if(html5first) { 
  • plugins/captions/test/multiple.html

    r1975 r1979  
    5050    <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/a95zAVN1.mp4',image:'http://content.bitsontherun.com/thumbs/a95zAVN1-720.jpg'},{files:'assets/sintel-chi.txt,assets/sintel-far.txt,assets/sintel-gre.txt,assets/sintel-jpn.txt,assets/sintel-kor.txt,assets/sintel-pol.txt,assets/sintel-rus.txt,assets/sintel-srp.txt,assets/sintel-tur.txt',labels:'Chinese,Farsi,Greek,Japanese,Korean,Polish,Russian,Serbian,Turkish'})">9 external srt tracks</a></li> 
    5151     <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/aytCR4cx.mp4',image:'http://content.bitsontherun.com/thumbs/aytCR4cx-720.jpg'},{files:'assets/bunny-eng.txt,assets/bunny-ned.txt'})">2 srt tracks, no labels</a></li> 
     52      
     53    <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/w5VkaqJ1-393434.mp4',image:'http://content.bitsontherun.com/thumbs/w5VkaqJ1-720.jpg'},{labels:'English,Français,Portugûes,Español,Deutsch,Norske'})">6 mp4 tracks, with labels</a></li> 
     54    <li><a href="javascript:loadPlayer({file:'http://content.bitsontherun.com/videos/a95zAVN1.mp4',image:'http://content.bitsontherun.com/thumbs/a95zAVN1-720.jpg'},{files:'assets/sintel-chi.txt,assets/sintel-far.txt,assets/sintel-gre.txt,assets/sintel-jpn.txt,assets/sintel-kor.txt,assets/sintel-pol.txt,assets/sintel-rus.txt,assets/sintel-srp.txt,assets/sintel-tur.txt',labels:'Chinese,Farsi,Greek,Japanese,Korean,Polish,Russian,Serbian,Turkish',label:'Greek'})">9 srt tracks, greek preset</a></li> 
    5255 
    5356 
  • plugins/captions/test/playlist.html

    r1973 r1979  
    4242var playlist = [{ 
    4343    title: 'Coronation Street', 
    44     description: 'Single, external XML captions.', 
     44    description: 'Single, external SRT captions.', 
    4545    file: 'http://content.bitsontherun.com/videos/7OCSON1y.mp4',  
    4646    image: 'http://content.bitsontherun.com/thumbs/7OCSON1y-320.jpg', 
    47     'captions.file': 'assets/corrie.xml' 
     47    'captions.file': 'assets/corrie.srt' 
    4848},{ 
    4949      title:'Big Buck Bunny', 
     
    7575</ul> 
    7676<ul> 
    77     <li><a href="javascript:jwplayer().load({file:'http://content.bitsontherun.com/videos/7OCSON1y.mp4','captions.file':'assets/corrie.xml',title: 'Coronation Street'})">load() one video</a> 
     77    <li><a href="javascript:jwplayer().load({file:'http://content.bitsontherun.com/videos/7OCSON1y.mp4','captions.file':'assets/corrie.srt',title: 'Coronation Street'})">load() one video</a> 
    7878    <li><a href="javascript:jwplayer().load('assets/playlist.xml')">load() RSS feed</a> 
    7979</ul> 
  • plugins/captions/test/styling.html

    r1964 r1979  
    3535 
    3636<ul> 
    37     <li><a href="javascript:loadPlayer({color:'FFCC00',file:'assets/corrie.srt',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold',textDecoration:'underline'})">config styling</a> (srt)</li> 
    38     <li><a href="javascript:loadPlayer({color:'FFCC00',file:'assets/corrie.xml',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold',textDecoration:'underline'})">config styling</a> (dfxp)</li> 
    39     <li><a href="javascript:loadPlayer({file:'assets/corrie-styled.srt'})">srt styling</a></li> 
     37    <li><a href="javascript:loadPlayer({color:'FFCC00',file:'assets/corrie.srt',fontFamily:'Georgia',fontSize:20,fontStyle:'italic',fontWeight:'bold',textDecoration:'underline'})">config styling</a></li> 
    4038    <li><a href="javascript:loadPlayer({file:'assets/corrie-styled.xml'})">dfxp styling</a></li> 
    41     <li><a href="javascript:loadPlayer({file:'assets/corrie-speakers.xml',fontFamily:'Georgia',fontSize:18,fontStyle:'italic',fontWeight:'bold'})">config &amp; dfxp styling</a></li> 
     39    <li><a href="javascript:loadPlayer({file:'assets/corrie-speakers.xml',fontFamily:'Georgia',fontSize:20,fontStyle:'italic',fontWeight:'bold'})">config &amp; dfxp styling</a></li> 
     40    <li><a href="javascript:loadPlayer({file:'assets/corrie-styled.srt'})">html in srt</a></li> 
    4241</ul> 
    4342 
Note: See TracChangeset for help on using the changeset viewer.