diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-11-15 16:53:38 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-11-15 16:53:38 +0000 |
| commit | 25f78ffd6fb74322652ab90aef50d5a3d1a4293d (patch) | |
| tree | 8b375220d230cd46bd8a81480e20fc6742875ab0 | |
| parent | bd5a444c7584b45a4ee15616db955aaa5451b471 (diff) | |
| download | xxv-25f78ffd6fb74322652ab90aef50d5a3d1a4293d.tar.gz xxv-25f78ffd6fb74322652ab90aef50d5a3d1a4293d.tar.bz2 | |
* jason: music - use flash based audio player
* jason: music enhance search functions
* jason: remove unused option hideMode
| -rw-r--r-- | skins/jason/audio-player/audio-player-noswfobject.js | 1 | ||||
| -rw-r--r-- | skins/jason/audio-player/audio-player-uncompressed.js | 109 | ||||
| -rw-r--r-- | skins/jason/audio-player/audio-player.js | 5 | ||||
| -rw-r--r-- | skins/jason/audio-player/license.txt | 19 | ||||
| -rw-r--r-- | skins/jason/audio-player/player.swf | bin | 0 -> 10816 bytes | |||
| -rw-r--r-- | skins/jason/audio.js | 79 | ||||
| -rw-r--r-- | skins/jason/autotimers.js | 1 | ||||
| -rw-r--r-- | skins/jason/chronicle.js | 1 | ||||
| -rw-r--r-- | skins/jason/files.lst | 2 | ||||
| -rw-r--r-- | skins/jason/locale/lang-de.js | 9 | ||||
| -rw-r--r-- | skins/jason/locale/lang-en.js | 11 | ||||
| -rwxr-xr-x | skins/jason/locale/lang-it.js | 9 | ||||
| -rw-r--r-- | skins/jason/movetimers.js | 1 | ||||
| -rw-r--r-- | skins/jason/music.js | 123 | ||||
| -rw-r--r-- | skins/jason/now.js | 1 | ||||
| -rw-r--r-- | skins/jason/program.js | 1 | ||||
| -rw-r--r-- | skins/jason/recordings.js | 1 | ||||
| -rw-r--r-- | skins/jason/search.js | 1 | ||||
| -rw-r--r-- | skins/jason/teletext.js | 1 | ||||
| -rw-r--r-- | skins/jason/timers.js | 1 | ||||
| -rw-r--r-- | skins/jason/users.js | 1 | ||||
| -rw-r--r-- | skins/jason/ux/Search.js | 3 | ||||
| -rw-r--r-- | skins/jason/vdr.js | 1 |
23 files changed, 328 insertions, 53 deletions
diff --git a/skins/jason/audio-player/audio-player-noswfobject.js b/skins/jason/audio-player/audio-player-noswfobject.js new file mode 100644 index 0000000..32c5a98 --- /dev/null +++ b/skins/jason/audio-player/audio-player-noswfobject.js @@ -0,0 +1 @@ +var AudioPlayer=function(){var F=[];var C;var E="";var A={};var D=-1;function B(G){return document.all?window[G]:document[G]}return{setup:function(H,G){E=H;A=G},getPlayer:function(G){return B(G)},embed:function(K,O){var I={};var M;var G;var P;var H;var N={};var J={};var L={};for(M in A){I[M]=A[M]}for(M in O){I[M]=O[M]}if(I.transparentpagebg=="yes"){N.bgcolor="#FFFFFF";N.wmode="transparent"}else{if(I.pagebg){N.bgcolor="#"+I.pagebg}N.wmode="opaque"}N.menu="false";for(M in I){if(M=="pagebg"||M=="width"||M=="transparentpagebg"){continue}J[M]=I[M]}L.name=K;L.style="outline: none";J.playerID=K;audioplayer_swfobject.embedSWF(E,K,I.width.toString(),"24","9",false,J,N,L);F.push(K)},syncVolumes:function(G,I){D=I;for(var H=0;H<F.length;H++){if(F[H]!=G){B(F[H]).setVolume(D)}}},activate:function(G){if(C&&C!=G){B(C).close()}C=G},load:function(I,G,J,H){B(I).load(G,J,H)},close:function(G){B(G).close();if(G==C){C=null}},open:function(G){B(G).open()},getVolume:function(G){return D}}}()
\ No newline at end of file diff --git a/skins/jason/audio-player/audio-player-uncompressed.js b/skins/jason/audio-player/audio-player-uncompressed.js new file mode 100644 index 0000000..ebfeb7d --- /dev/null +++ b/skins/jason/audio-player/audio-player-uncompressed.js @@ -0,0 +1,109 @@ +var AudioPlayer = function () {
+ var instances = [];
+ var activePlayerID;
+ var playerURL = "";
+ var defaultOptions = {};
+ var currentVolume = -1;
+
+ function getPlayer(playerID) {
+ return document.all ? window[playerID] : document[playerID];
+ }
+
+ return {
+ setup: function (url, options) {
+ playerURL = url;
+ defaultOptions = options;
+ },
+
+ getPlayer: function (playerID) {
+ return getPlayer(playerID);
+ },
+
+ embed: function (elementID, options) {
+ var instanceOptions = {};
+ var key;
+ var so;
+ var bgcolor;
+ var wmode;
+
+ var flashParams = {};
+ var flashVars = {};
+ var flashAttributes = {};
+
+ // Merge default options and instance options
+ for (key in defaultOptions) {
+ instanceOptions[key] = defaultOptions[key];
+ }
+ for (key in options) {
+ instanceOptions[key] = options[key];
+ }
+
+ if (instanceOptions.transparentpagebg == "yes") {
+ flashParams.bgcolor = "#FFFFFF";
+ flashParams.wmode = "transparent";
+ } else {
+ if (instanceOptions.pagebg) {
+ flashParams.bgcolor = "#" + instanceOptions.pagebg;
+ }
+ flashParams.wmode = "opaque";
+ }
+
+ flashParams.menu = "false";
+
+ for (key in instanceOptions) {
+ if (key == "pagebg" || key == "width" || key == "transparentpagebg") {
+ continue;
+ }
+ flashVars[key] = instanceOptions[key];
+ }
+
+ flashAttributes.name = elementID;
+ flashAttributes.style = "outline: none";
+
+ flashVars.playerID = elementID;
+
+ swfobject.embedSWF(playerURL, elementID, instanceOptions.width.toString(), "24", "9", false, flashVars, flashParams, flashAttributes);
+
+
+ instances.push(elementID);
+ },
+
+ syncVolumes: function (playerID, volume) {
+ currentVolume = volume;
+ for (var i = 0; i < instances.length; i++) {
+ if (instances[i] != playerID) {
+ getPlayer(instances[i]).setVolume(currentVolume);
+ }
+ }
+ },
+
+ activate: function (playerID) {
+ if (activePlayerID && activePlayerID != playerID) {
+ getPlayer(activePlayerID).close();
+ }
+
+ activePlayerID = playerID;
+ },
+
+ load: function (playerID, soundFile, titles, artists) {
+ getPlayer(playerID).load(soundFile, titles, artists);
+ },
+
+ close: function (playerID) {
+ getPlayer(playerID).close();
+ if (playerID == activePlayerID) {
+ activePlayerID = null;
+ }
+ },
+
+ open: function (playerID) {
+ getPlayer(playerID).open();
+ },
+
+ getVolume: function (playerID) {
+ return currentVolume;
+ }
+
+ }
+
+}();
diff --git a/skins/jason/audio-player/audio-player.js b/skins/jason/audio-player/audio-player.js new file mode 100644 index 0000000..8b483e2 --- /dev/null +++ b/skins/jason/audio-player/audio-player.js @@ -0,0 +1,5 @@ +var AudioPlayer=function(){var F=[];var C;var E="";var A={};var D=-1;function B(G){return document.all?window[G]:document[G]}return{setup:function(H,G){E=H;A=G},getPlayer:function(G){return B(G)},embed:function(K,O){var I={};var M;var G;var P;var H;var N={};var J={};var L={};for(M in A){I[M]=A[M]}for(M in O){I[M]=O[M]}if(I.transparentpagebg=="yes"){N.bgcolor="#FFFFFF";N.wmode="transparent"}else{if(I.pagebg){N.bgcolor="#"+I.pagebg}N.wmode="opaque"}N.menu="false";for(M in I){if(M=="pagebg"||M=="width"||M=="transparentpagebg"){continue}J[M]=I[M]}L.name=K;L.style="outline: none";J.playerID=K;audioplayer_swfobject.embedSWF(E,K,I.width.toString(),"24","9",false,J,N,L);F.push(K)},syncVolumes:function(G,I){D=I;for(var H=0;H<F.length;H++){if(F[H]!=G){B(F[H]).setVolume(D)}}},activate:function(G){if(C&&C!=G){B(C).close()}C=G},load:function(I,G,J,H){B(I).load(G,J,H)},close:function(G){B(G).close();if(G==C){C=null}},open:function(G){B(G).open()},getVolume:function(G){return D}}}()/* SWFObject v2.1 <http://code.google.com/p/swfobject/> + Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis + This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> +*/ +var audioplayer_swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in audioplayer_swfobject){audioplayer_swfobject[q]=null}audioplayer_swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
\ No newline at end of file diff --git a/skins/jason/audio-player/license.txt b/skins/jason/audio-player/license.txt new file mode 100644 index 0000000..d691a84 --- /dev/null +++ b/skins/jason/audio-player/license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2008 Martin Laine
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file diff --git a/skins/jason/audio-player/player.swf b/skins/jason/audio-player/player.swf Binary files differnew file mode 100644 index 0000000..04be6a9 --- /dev/null +++ b/skins/jason/audio-player/player.swf diff --git a/skins/jason/audio.js b/skins/jason/audio.js new file mode 100644 index 0000000..831b83a --- /dev/null +++ b/skins/jason/audio.js @@ -0,0 +1,79 @@ +/*
+ * jason - Javascript based skin for xxv
+ * Copyright(c) 2009, anbr
+ *
+ * http://xxv.berlios.de/ + * + * $Id: audio.js 1391 2009-01-18 17:51:15Z anbr $ + */
+
+Ext.xxv.AudioWindow = function(item) {
+ + var width = 320; + var height = 29; + var marginHeight = 30; + var marginWidth = 16; + + AudioPlayer.setup("audio-player/player.swf", { + width: 320 + ,animation: "no" + ,transparentpagebg: "yes" + }); + + this.item = item; + Ext.xxv.AudioWindow.superclass.constructor.call(this, {
+ title: this.szTitle + ,iconCls: 'music-icon'
+ ,id: 'audio-win' + ,width: width + marginWidth
+ ,height: height + marginHeight
+ ,resizable: false + ,plain: true
+ ,modal: false
+ ,autoScroll: false
+ ,closeAction: 'hide' + ,maximizable: false + ,stateful: true
+ ,items: [{ + // id:'audio-player' + region: 'center' + ,width: width
+ ,height: height + ,html: "<div id='audio-player'></div>" + }] + }); + this.on('beforeshow', this.onBeforeShow, this); + Ext.xxv.AudioWindow.superclass.show.apply(this, arguments); +}
+
+Ext.extend(Ext.xxv.AudioWindow, Ext.Window, { + szTitle: "Music playback" + ,onBeforeShow : function(){ + if(!this.embed){ + for(var i = 0, len = this.item.url.length; i < len; i++){ + this.item.url[i] = escape(this.item.url[i]); + } + AudioPlayer.embed('audio-player', { + soundFile: this.item.url.join(',') + ,titles: this.item.title.join(',') + ,artists: this.item.artist.join(',') + ,autostart: 'yes' + ,loader:'404040' + }); + this.embed = true; + } + } + ,hide : function(){ + if(this.embed) { + AudioPlayer.close('audio-player'); + } + Ext.xxv.AudioWindow.superclass.hide.apply(this, arguments); + } + ,show : function(item){ + if(this.embed) { + AudioPlayer.load('audio-player',item.url.join(','),item.title.join(','),item.artist.join(',')); + AudioPlayer.open('audio-player'); + } + Ext.xxv.AudioWindow.superclass.show.apply(this, arguments);
+ }
+}); diff --git a/skins/jason/autotimers.js b/skins/jason/autotimers.js index 0b3891b..0a4ff28 100644 --- a/skins/jason/autotimers.js +++ b/skins/jason/autotimers.js @@ -403,7 +403,6 @@ function createAutoTimerView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[
viewer.gridAutoTimer ]
diff --git a/skins/jason/chronicle.js b/skins/jason/chronicle.js index 70a4aaf..07b3904 100644 --- a/skins/jason/chronicle.js +++ b/skins/jason/chronicle.js @@ -267,7 +267,6 @@ function createChronicleView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[ viewer.chronicleGrid ]
});
diff --git a/skins/jason/files.lst b/skins/jason/files.lst index 5bc74eb..aa85700 100644 --- a/skins/jason/files.lst +++ b/skins/jason/files.lst @@ -8,12 +8,14 @@ ux/Multiselect.js \ ux/TabCloseMenu.js \ ux/Search.js \ ux/SlideZone.js \ +audio-player/audio-player.js \ common.js \ reader.js \ help.js \ form.js \ channelspanel.js \ stream.js \ +audio.js \ monitor.js \ remote.js \ channels.js \ diff --git a/skins/jason/locale/lang-de.js b/skins/jason/locale/lang-de.js index a04a48c..3277cbc 100644 --- a/skins/jason/locale/lang-de.js +++ b/skins/jason/locale/lang-de.js @@ -236,10 +236,17 @@ Ext.xxv.vdrGrid.prototype.szLoadException = "Konnte keine Daten über Video Disk Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Video Disk Rekorder erfolgreich gelöscht.\r\n{0}"; Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Konnte Video Disk Rekorder nicht löschen!\r\n{0}"; +/* audio.js */ +Ext.xxv.AudioWindow.prototype.szTitle = "Musikwiedergabe"; + /* music.js */ Ext.xxv.musicGrid.prototype.szTitle = "Musik"; Ext.xxv.musicGrid.prototype.szToolTip = "Liste von Musiktitel anzeigen"; -Ext.xxv.musicGrid.prototype.szFindTitle = "Suche Titel"; +Ext.xxv.musicGrid.prototype.szFindTitle = "Suche gleiche Titel"; +Ext.xxv.musicGrid.prototype.szFindArtist = "Suche Titel vom selben Künstler"; +Ext.xxv.musicGrid.prototype.szFindAlbum = "Suche Titel vom selben Album"; +Ext.xxv.musicGrid.prototype.szFindGenre = "Suche Titel vom selben Genre"; +Ext.xxv.musicGrid.prototype.szFindYear = "Suche Titel aus dem selben Jahr"; Ext.xxv.musicGrid.prototype.szPlaying = "Wiedergabe"; Ext.xxv.musicGrid.prototype.szColAlbum = "Album"; Ext.xxv.musicGrid.prototype.szColArtist = "Künstler"; diff --git a/skins/jason/locale/lang-en.js b/skins/jason/locale/lang-en.js index 65bb980..ed63525 100644 --- a/skins/jason/locale/lang-en.js +++ b/skins/jason/locale/lang-en.js @@ -238,10 +238,17 @@ Ext.xxv.vdrGrid.prototype.szLoadException = "Couldn't get data about video disk Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Video disk recorder deleted successful.\r\n{0}"; Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Couldn't delete video disk recorder!\r\n{0}"; +/* audio.js */ +Ext.xxv.AudioWindow.prototype.szTitle = "Music playback"; + /* music.js */ Ext.xxv.musicGrid.prototype.szTitle = "Music"; Ext.xxv.musicGrid.prototype.szToolTip = "Display list of music title"; -Ext.xxv.musicGrid.prototype.szFindTitle = "Search title"; +Ext.xxv.musicGrid.prototype.szFindTitle = "Search tracks with same title"; +Ext.xxv.musicGrid.prototype.szFindArtist = "Search tracks by same artist"; +Ext.xxv.musicGrid.prototype.szFindAlbum = "Search tracks from same album"; +Ext.xxv.musicGrid.prototype.szFindGenre = "Search tracks by same genre"; +Ext.xxv.musicGrid.prototype.szFindYear = "Search tracks from same year"; Ext.xxv.musicGrid.prototype.szPlaying = "Playing"; Ext.xxv.musicGrid.prototype.szColAlbum = "Album"; Ext.xxv.musicGrid.prototype.szColArtist = "Artist"; @@ -251,7 +258,7 @@ Ext.xxv.musicGrid.prototype.szColTrack = "Track"; Ext.xxv.musicGrid.prototype.szColYear = "Year"; Ext.xxv.musicGrid.prototype.szColGenre = "Genre";
Ext.xxv.musicGrid.prototype.szColComment = "Comment"; -Ext.xxv.musicGrid.prototype.szLoadException = "Couldn't get title from music list!\r\n{0}"; +Ext.xxv.musicGrid.prototype.szLoadException = "Couldn't get tracks from music list!\r\n{0}"; /* teletext */ Ext.xxv.TeleTextView.prototype.szTitle = "Teletext"; diff --git a/skins/jason/locale/lang-it.js b/skins/jason/locale/lang-it.js index 1f23db9..9d61011 100755 --- a/skins/jason/locale/lang-it.js +++ b/skins/jason/locale/lang-it.js @@ -238,10 +238,17 @@ Ext.xxv.vdrGrid.prototype.szLoadException = "Impossibile recuperare dati su Vide Ext.xxv.vdrGrid.prototype.szDeleteSuccess = "Eliminazione Video Disk Recorder riuscita.\r\n{0}"; Ext.xxv.vdrGrid.prototype.szDeleteFailure = "Impossibile eliminare Video Disk Recorder!\r\n{0}"; +/* audio.js */ +/*NEED TO TRANSLATE*/ Ext.xxv.AudioWindow.prototype.szTitle = "Musica riproduci"; + /* music.js */ Ext.xxv.musicGrid.prototype.szTitle = "Musica"; Ext.xxv.musicGrid.prototype.szToolTip = "Mostra elenco titoli musicali"; -Ext.xxv.musicGrid.prototype.szFindTitle = "Cerca titolo"; +/*NEED TO TRANSLATE*/ Ext.xxv.musicGrid.prototype.szFindTitle = "Search tracks with same title"; +/*NEED TO TRANSLATE*/ Ext.xxv.musicGrid.prototype.szFindArtist = "Search tracks by same artist"; +/*NEED TO TRANSLATE*/ Ext.xxv.musicGrid.prototype.szFindAlbum = "Search tracks from same album"; +/*NEED TO TRANSLATE*/ Ext.xxv.musicGrid.prototype.szFindGenre = "Search tracks by same genre"; +Ext.xxv.musicGrid.prototype.szFindYear = "Search tracks from same year"; Ext.xxv.musicGrid.prototype.szPlaying = "Riproduci"; Ext.xxv.musicGrid.prototype.szColAlbum = "Album"; Ext.xxv.musicGrid.prototype.szColArtist = "Artista"; diff --git a/skins/jason/movetimers.js b/skins/jason/movetimers.js index 2a90cd8..0e4c67e 100644 --- a/skins/jason/movetimers.js +++ b/skins/jason/movetimers.js @@ -283,7 +283,6 @@ function createMoveTimersView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[
viewer.gridMoveTimers ]
diff --git a/skins/jason/music.js b/skins/jason/music.js index e3d81e3..bacb475 100644 --- a/skins/jason/music.js +++ b/skins/jason/music.js @@ -11,7 +11,7 @@ Ext.xxv.musicStore = function() { // create the data store return new Ext.data.GroupingStore({ - baseParams:{cmd:'ml'} + baseParams:{cmd:'ml',data:'all:1'} ,autoLoad:{params:{start:0, limit:configuration.pageSize}} ,reader: new Ext.xxv.jsonReader({
fields: [
@@ -87,7 +87,17 @@ Ext.xxv.musicGrid = function(viewer) { var cm = new Ext.grid.ColumnModel(this.columns); cm.defaultSortable = true; - + this.filter = new Ext.ux.grid.Search({ + position:'top' + ,shortcutKey:null + ,paramNames: { + fields:'cmd' + ,all:'ml' + ,defdata:'all:1' + ,cmd:'ms' + ,query:'data' + } + }); Ext.xxv.musicGrid.superclass.constructor.call(this, {
region: 'center'
,id: 'music-view-grid'
@@ -116,16 +126,7 @@ Ext.xxv.musicGrid = function(viewer) { ,handler: function(){ this.EditItem(null); }
} ]*/}) - ,plugins:[new Ext.ux.grid.Search({ - position:'top' - ,shortcutKey:null - ,paramNames: { - fields:'cmd' - ,all:'ml' - ,cmd:'ms' - ,query:'data' - } - })] + ,plugins:[this.filter] }); this.store.on({
@@ -135,14 +136,18 @@ Ext.xxv.musicGrid = function(viewer) { }); this.on('rowcontextmenu', this.onContextClick, this); - //this.on('rowdblclick', this.onEditItem, this);
+ this.on('rowdblclick', this.onDblClick, this);
}; Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel szTitle : "Music" ,szToolTip : "Display list of music title" - ,szFindTitle : "Search title" + ,szFindTitle : "Search tracks with same title" + ,szFindArtist : "Search tracks by same artist" + ,szFindAlbum : "Search tracks from same album" + ,szFindGenre : "Search tracks by same genre" + ,szFindYear : "Search tracks from same year" ,szPlaying : "Playing" ,szColAlbum : "Album" ,szColArtist : "Artist" @@ -152,7 +157,7 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel ,szColYear : "Year" ,szColGenre : "Genre"
,szColComment : "Comment" - ,szLoadException : "Couldn't get title from music list!\r\n{0}" + ,szLoadException : "Couldn't get tracks from music list!\r\n{0}" ,stateful: true @@ -167,21 +172,39 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel if(!this.menu){ // create context menu on first right click
this.menu = new Ext.menu.Menu({
id:'grid-ctx',
- items: [/*{
- itemId:'s'
- ,text: this.szFindTitle
- ,iconCls: 'find-icon'
- ,scope:this
- ,disabled: true - ,handler: function(){ this.viewer.searchTab(this.ctxRecord);} - },*/{
- itemId:'m3'
+ items: [{
+ itemId:'mg'
,text: this.szPlaying
,iconCls: 'playing-music-icon'
,scope:this
,disabled: true ,handler: function() { this.PlayingItem(this.ctxRecord); }
- }
+ },'-',{
+ text: this.szFindTitle
,iconCls: 'find-icon'
+ ,scope:this
+ ,disabled: false + ,handler: function(){ this.reload('title', this.ctxRecord.data.title);} + },{
+ text: this.szFindArtist
,iconCls: 'find-icon'
+ ,scope:this
+ ,disabled: false + ,handler: function(){ this.reload('artist', this.ctxRecord.data.artist);} + },{
+ text: this.szFindAlbum
,iconCls: 'find-icon'
+ ,scope:this
+ ,disabled: false + ,handler: function(){ this.reload('album', this.ctxRecord.data.album);} + }/*,{ + text: this.szFindGenre
,iconCls: 'find-icon'
+ ,scope:this
+ ,disabled: false + ,handler: function(){ this.reload('genre', this.ctxRecord.data.genre);} + }*/,{ + text: this.szFindYear
,iconCls: 'find-icon'
+ ,scope:this
+ ,disabled: false + ,handler: function(){ this.reload('year', this.ctxRecord.data.year);} + }
]
});
this.menu.on('hide', this.onContextHide, this);
@@ -197,7 +220,7 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel var items = this.menu.items;
if(items) { items.eachKey(function(key, f) { - if(XXV.help.cmdAllowed(f.itemId)) + if(f.disabled && XXV.help.cmdAllowed(f.itemId)) f.enable(); },items); } @@ -223,10 +246,31 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel value
); } + ,reload : function(topic, value) { + var f = this.filter.field.getValue(); + if(f && f != '') { + this.filter.field.setValue(''); + } + this.store.baseParams = { + cmd: 'ml'
+ ,data: topic + ':' + value
+ }; + this.store.title = value;
+ this.store.load({params:{start:0, limit:configuration.pageSize}});
+ } /******************************************************************************/ + ,onDblClick : function(grid, index, e) { + //if(e) e.stopEvent();
+ if(this.ctxRow){
+ Ext.fly(this.ctxRow).removeClass('x-node-ctx');
+ this.ctxRow = null;
+ }
+ var record = this.store.getAt(index); + this.PlayingItem(record); + } ,PlayingItem : function( record ) { this.stopEditing();
- this.loadMask.show(); + //this.loadMask.show(); var gsm = this.getSelectionModel(); var sel = gsm.getSelections() @@ -234,24 +278,28 @@ Ext.extend(Ext.xxv.musicGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel gsm.selectRecords([record]); sel.push(record); } - var todel = ""; + var toplay = new Array(); + var totitle = new Array(); + var toartist = new Array(); + for(var i = 0, len = sel.length; i < len; i++){ - if(i != 0) - todel += ','; - todel += sel[i].data.id; + toplay.push(XXV.help.cmdHTML('mg',{data:sel[i].data.id})); + totitle.push(sel[i].data.title); + toartist.push(sel[i].data.artist); } var item = { - url : XXV.help.cmdHTML('m3',{data:todel}) - ,title: sel[0].data.title + url : toplay + ,title: totitle + ,artist: toartist }; - if(!this.viewer.streamwin){
- this.viewer.streamwin = new Ext.xxv.StreamWindow(item);
+ if(!this.viewer.audiowin){
+ this.viewer.audiowin = new Ext.xxv.AudioWindow(item);
} else {
- this.viewer.streamwin.show(item); + this.viewer.audiowin.show(item); } - this.loadMask.hide(); + //this.loadMask.hide(); } }); @@ -266,7 +314,6 @@ function createMusicView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[ viewer.musicGrid ]
});
diff --git a/skins/jason/now.js b/skins/jason/now.js index d856812..fd21ccf 100644 --- a/skins/jason/now.js +++ b/skins/jason/now.js @@ -477,7 +477,6 @@ function createNowView(viewer,id) { stateful:true,
iconCls: 'channel-icon',
layout:'border',
- hideMode:'offsets',
items:[
viewer.gridNow, {
diff --git a/skins/jason/program.js b/skins/jason/program.js index fed9285..3535e54 100644 --- a/skins/jason/program.js +++ b/skins/jason/program.js @@ -305,7 +305,6 @@ function createProgramView(viewer,id, record) { iconCls: 'channel-icon',
layout:'border', stateful:true,
- hideMode:'offsets', closable:true,
items:[
viewer.gridProgram, diff --git a/skins/jason/recordings.js b/skins/jason/recordings.js index 86df45f..d822ea6 100644 --- a/skins/jason/recordings.js +++ b/skins/jason/recordings.js @@ -1344,7 +1344,6 @@ function createRecordingsView(viewer,id) { ,border:false ,layout:'border'
,stateful:true
- ,hideMode:'offsets'
,items:[ viewer.gridRecordings ,{
diff --git a/skins/jason/search.js b/skins/jason/search.js index 23c9279..b539647 100644 --- a/skins/jason/search.js +++ b/skins/jason/search.js @@ -293,7 +293,6 @@ function createSearchView(viewer,id,lookup) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[
viewer.gridSearch, {
diff --git a/skins/jason/teletext.js b/skins/jason/teletext.js index 491a032..0519783 100644 --- a/skins/jason/teletext.js +++ b/skins/jason/teletext.js @@ -276,7 +276,6 @@ function createTeleTextView(viewer,id,name, channel) { ,border:false ,layout:'border'
,stateful:true
- ,hideMode:'offsets'
,items:[ viewer.pageTeleText ] ,tbar:new Ext.Toolbar({ items: [ diff --git a/skins/jason/timers.js b/skins/jason/timers.js index a3cc3cc..8cf3fb7 100644 --- a/skins/jason/timers.js +++ b/skins/jason/timers.js @@ -577,7 +577,6 @@ function createTimerView(viewer,id) { border:false, layout:'border',
stateful:true,
- hideMode:'offsets',
items:[
viewer.gridTimer, {
diff --git a/skins/jason/users.js b/skins/jason/users.js index b85d954..069388e 100644 --- a/skins/jason/users.js +++ b/skins/jason/users.js @@ -288,7 +288,6 @@ function createUsersView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[
viewer.gridusers ]
diff --git a/skins/jason/ux/Search.js b/skins/jason/ux/Search.js index 1a22b3d..c59c9f0 100644 --- a/skins/jason/ux/Search.js +++ b/skins/jason/ux/Search.js @@ -167,6 +167,9 @@ Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, { store.baseParams[this.paramNames.query] = val; } else { store.baseParams[this.paramNames.fields] = this.paramNames.all; + if(this.paramNames.defdata) { + store.baseParams[this.paramNames.query] = this.paramNames.defdata; + } } // reload store diff --git a/skins/jason/vdr.js b/skins/jason/vdr.js index 596d6da..f538b2a 100644 --- a/skins/jason/vdr.js +++ b/skins/jason/vdr.js @@ -322,7 +322,6 @@ function createVDRView(viewer,id) { border:false, layout:'border', stateful:true,
- hideMode:'offsets',
items:[
viewer.gridvdr ]
|
