From 287d633174bed686da64c872eb683f084ac6bc76 Mon Sep 17 00:00:00 2001 From: davidmpurdy Date: Thu, 30 Jul 2020 15:20:09 -0600 Subject: [PATCH] Updated color/style customizations to work better with conflicting CSS in page --- dist/player.js | 2 +- src/initialize_customization.js | 12 ++++++------ src/scss/slider.scss | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/player.js b/dist/player.js index 509aa26..8bdff10 100644 --- a/dist/player.js +++ b/dist/player.js @@ -61,4 +61,4 @@ function(e){var t,n,i,r,o,s,a,u,l,c,d,f,p,h,g,v,m,y,b,x="sizzle"+1*new Date,_=e. * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license - */r=[n(0),n(1)],void 0===(o="function"==typeof(i=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(t,r):i)||(e.exports=o)},function(e,t,n){var i=n(3),r=n(17);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".td_player_container{display:flex;flex-flow:row wrap;justify-content:flex-start}.td_player_container .td_container{display:none}.td_player_container .player_contents{flex-basis:40%;flex-grow:4;position:relative}.td_player_container:after{content:' ';clear:both;display:block}.td_player_container .volume-slider-container{flex-basis:25%;min-width:100px;flex-grow:1;max-width:300px;display:grid;min-height:35px}.td_player_container .transport-button{flex-shrink:0;flex-grow:0;padding:10px 0;margin:0 10px 0 0;border:none;color:#FFF;outline:none;width:70px}.td_player_container .transport-button.playing,.td_player_container .transport-button.stopped{cursor:pointer}.td_player_container .transport-button .status{font-size:12pt;font-weight:normal;line-height:1}.td_player_container .transport-button .transport-icon{width:35px;height:35px;display:block;margin:0px auto 4px auto;position:relative}.td_player_container #tdplayer_ondemand{display:none}.td_player_container .transport-icon .shape{stroke-width:0}\n",""]),e.exports=t},function(e,t,n){var i=n(3),r=n(19);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".spinner{animation:rotator 1.4s linear infinite;width:40px;height:auto}@keyframes rotator{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}.path{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}\n",""]),e.exports=t},function(e,t,n){var i=n(3),r=n(21);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,"/*!\n * Modified from the original JQuery UI slider styles by David Purdy\n *\n * Copyright KTOO Public Media\n *\n * -----------\n *\n * jQuery UI Slider 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slider/#theming\n */.td_player_container .ui-slider{position:relative;text-align:left;background-color:gray}.td_player_container .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:20px;height:20px;cursor:default;-ms-touch-action:none;touch-action:none;outline:none;border-radius:20px;background-color:#fff}.td_player_container .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.td_player_container .ui-slider.ui-state-disabled .ui-slider-handle,.td_player_container .ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.td_player_container .ui-slider-horizontal{height:6px;top:50%;margin-top:-3px;min-width:75px}.td_player_container .ui-slider-horizontal .ui-slider-handle{top:-7px;margin-left:-12px;margin-top:-2px;box-sizing:content-box}.td_player_container .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.td_player_container .ui-slider-horizontal .ui-slider-range-min{left:0}.td_player_container .ui-slider-horizontal .ui-slider-range-max{right:0}.td_player_container .ui-slider-vertical{width:6px;height:100px}.td_player_container .ui-slider-vertical .ui-slider-handle{left:-13px;margin-left:0;margin-bottom:-10px}.td_player_container .ui-slider-vertical .ui-slider-range{left:0;width:100%}.td_player_container .ui-slider-vertical .ui-slider-range-min{bottom:0}.td_player_container .ui-slider-vertical .ui-slider-range-max{top:0}\n",""]),e.exports=t},function(e,t,n){"use strict";(function(t){var i=n(24),r=n(25),o=n(26);e.exports=function(e){var n,a,u=[],l=1;if("string"==typeof e)if(i[e])u=i[e].slice(),a="rgb";else if("transparent"===e)l=0,a="rgb",u=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var c=(p=e.slice(1)).length;l=1,c<=4?(u=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===c&&(l=parseInt(p[3]+p[3],16)/255)):(u=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===c&&(l=parseInt(p[6]+p[7],16)/255)),u[0]||(u[0]=0),u[1]||(u[1]=0),u[2]||(u[2]=0),a="rgb"}else if(n=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var d=n[1],f="rgb"===d,p=d.replace(/a$/,"");a=p;c="cmyk"===p?4:"gray"===p?1:3;u=n[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===p?255*parseFloat(e)/100:parseFloat(e);if("h"===p[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==s[e])return s[e]}return parseFloat(e)})),d===p&&u.push(1),l=f||void 0===u[c]?1:u[c],u=u.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(u=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),a=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(r(e)){var h=o(e.r,e.red,e.R,null);null!==h?(a="rgb",u=[h,o(e.g,e.green,e.G),o(e.b,e.blue,e.B)]):(a="hsl",u=[o(e.h,e.hue,e.H),o(e.s,e.saturation,e.S),o(e.l,e.lightness,e.L,e.b,e.brightness)]),l=o(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(l/=100)}else(Array.isArray(e)||t.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(u=[e[0],e[1],e[2]],a="rgb",l=4===e.length?e[3]:1);else a="rgb",u=[e>>>16,(65280&e)>>>8,255&e];return{space:a,values:u,alpha:l}};var s={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,n(23))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){"use strict";var i=Object.prototype.toString;e.exports=function(e){var t;return"[object Object]"===i.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},function(e,t){e.exports=function(){for(var e=0;eCopy log'),r()("#"+i).click((function(){d()(r()(t).text())}))),"object"==f(e)&&(e=JSON.stringify(e)),n.append(e+"\n")}else console.log(e)}}var h=n(9),g=n.n(h),v=n(5),m=n.n(v),y=n(10),b=n.n(y),x=n(11),_=n.n(x);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;nLoading'},this.button_states[this.STATUS.LOADING]={class:"loading",content:m.a+'
Starting
'},this.button_states[this.STATUS.PLAYING]={class:"playing",content:_.a+'
Stop
'},this.button_states[this.STATUS.STOPPED]={class:"stopped",content:b.a+'
Play
'},this.cookie_expiration=new Date("December 31, 9999 01:01:00")}},{key:"init_volume",value:function(){var e=this;this.volume_settings=s.a.getJSON()["ktoo-stream-volumes"]?s.a.getJSON()["ktoo-stream-volumes"]:{};var t=75;this.volume_settings&&(this.volume_settings[this.station]>=0&&this.volume_settings[this.station]<=100?t=Math.max(15,this.volume_settings[this.station]):this.volume_settings.default&&(t=Math.max(15,this.volume_settings.default))),this.update_volume(t),this.conditional_volume((function(){r()("#"+e.player_id+" .volume-slider").slider({value:e.volume,slide:function(t,n){e.update_volume(n.value)}})}))}},{key:"init_elements",value:function(){var e=this;r()("#"+this.player_id).wrapInner("
"),r()("#"+this.player_id).prepend(g.a),l(this.player_id),this.conditional_volume((function(){r()("#"+e.player_id+" .volume-slider-container").show()})),r()("#"+this.player_id).addClass("td_player_container"),this.td_container_id="td_container_"+Math.floor(1e4*Math.random()),r()("#"+this.player_id+" .td_container").attr("id",this.td_container_id),this.set_player_state("initializing")}},{key:"conditional_volume",value:function(e){var t=new Audio;t.addEventListener("volumechange",(function(t){e&&e()})),t.volume=.76543}},{key:"update_volume",value:function(e){this.volume=e,this.player&&"function"==typeof this.player.setVolume&&this.player.setVolume(e/100),this.volume_settings&&"object"==w(this.volume_settings)||(this.volume_settings={}),this.volume_settings[this.station]=e,this.volume_settings.default=e,s.a.set("ktoo-stream-volumes",this.volume_settings)}},{key:"get_volume",value:function(){return this.volume}},{key:"init_player",value:function(){var e=this,t={coreModules:[{id:"MediaPlayer",playerId:this.td_container_id,geoTargeting:!1,techPriority:["Html5","Flash"],audioAdaptive:!0}],playerReady:function(){e.on_player_ready()},configurationError:function(){e.on_player_error()},moduleError:function(){e.on_player_error()}};this.player=new TDSdk(t),p("Player initialized; TDSdk: "),p(this.player)}},{key:"set_player_state",value:function(e){p("set_player_state: "+e),r()("#"+this.player_id+" .transport-button").html(this.button_states[e].content),r()("#"+this.player_id+" .transport-button").attr("class",this.button_states[e].class+" transport-button"),this.player_state=e}},{key:"on_player_ready",value:function(){var e=this;p("on_player_ready"),this.set_player_state(this.STATUS.STOPPED),this.player.addEventListener("stream-status",(function(t){e.on_status_change(t)})),r()("#"+this.player_id+" .transport-button").click((function(){switch(p("Transport clicked; state: "+e.player_state),e.player_state){case e.STATUS.STOPPED:p("player.setVolume"),e.player.setVolume(e.get_volume()/100),p("player.play; station: "+e.station),e.player.play({station:e.station}),p("done");break;case e.STATUS.LOADING:case e.STATUS.PLAYING:p("player.stop"),e.player.stop();default:p("Other state: "+e.player_state)}})),this.conditional_volume((function(){l(e.player_id),r()("#"+e.player_id+" .volume-slider").show(),e.player.setVolume(e.volume/100),r()("#"+e.player_id+" .volume-slider").slider({value:100*e.player.getVolume()})}))}},{key:"on_status_change",value:function(e){switch(p("on_status_change"),p(e),e.data.code){case"LIVE_PAUSE":case"LIVE_STOP":this.set_player_state("stopped");break;case"LIVE_BUFFERING":case"LIVE_CONNECTING":case"LIVE_RECONNECTING":case"GETTING_STATION_INFORMATION":this.set_player_state("loading");break;case"LIVE_PLAYING":this.set_player_state("playing")}}},{key:"on_player_error",value:function(e){p(object),p(object.data.errors)}}])&&C(t.prototype,n),i&&C(t,i),e}(),T="livestream_player";r()(document).ready((function(){r.a.getScript("//sdk.listenlive.co/web/2.9/td-sdk.min.js").done((function(e,t){p("SDK get done"),p("player_id: "+T),new k(T)}))}))}]); \ No newline at end of file + */r=[n(0),n(1)],void 0===(o="function"==typeof(i=function(e){return e.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}})?i.apply(t,r):i)||(e.exports=o)},function(e,t,n){var i=n(3),r=n(17);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".td_player_container{display:flex;flex-flow:row wrap;justify-content:flex-start}.td_player_container .td_container{display:none}.td_player_container .player_contents{flex-basis:40%;flex-grow:4;position:relative}.td_player_container:after{content:' ';clear:both;display:block}.td_player_container .volume-slider-container{flex-basis:25%;min-width:100px;flex-grow:1;max-width:300px;display:grid;min-height:35px}.td_player_container .transport-button{flex-shrink:0;flex-grow:0;padding:10px 0;margin:0 10px 0 0;border:none;color:#FFF;outline:none;width:70px}.td_player_container .transport-button.playing,.td_player_container .transport-button.stopped{cursor:pointer}.td_player_container .transport-button .status{font-size:12pt;font-weight:normal;line-height:1}.td_player_container .transport-button .transport-icon{width:35px;height:35px;display:block;margin:0px auto 4px auto;position:relative}.td_player_container #tdplayer_ondemand{display:none}.td_player_container .transport-icon .shape{stroke-width:0}\n",""]),e.exports=t},function(e,t,n){var i=n(3),r=n(19);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,".spinner{animation:rotator 1.4s linear infinite;width:40px;height:auto}@keyframes rotator{0%{transform:rotate(0deg)}100%{transform:rotate(270deg)}}.path{stroke-dasharray:187;stroke-dashoffset:0;transform-origin:center;animation:dash 1.4s ease-in-out infinite}@keyframes dash{0%{stroke-dashoffset:187}50%{stroke-dashoffset:46.75;transform:rotate(135deg)}100%{stroke-dashoffset:187;transform:rotate(450deg)}}\n",""]),e.exports=t},function(e,t,n){var i=n(3),r=n(21);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);e.exports=r.locals||{}},function(e,t,n){(t=n(4)(!1)).push([e.i,"/*!\n * Modified from the original JQuery UI slider styles by David Purdy\n *\n * Copyright KTOO Public Media\n *\n * -----------\n *\n * jQuery UI Slider 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/slider/#theming\n */.td_player_container .ui-slider{position:relative;text-align:left;border:none;background-color:gray}.td_player_container .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:20px;height:20px;cursor:default;-ms-touch-action:none;touch-action:none;outline:none;border-radius:20px;background-color:#fff}.td_player_container .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.td_player_container .ui-slider.ui-state-disabled .ui-slider-handle,.td_player_container .ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.td_player_container .ui-slider-horizontal{height:6px;top:50%;margin-top:-3px;min-width:75px}.td_player_container .ui-slider-horizontal .ui-slider-handle{top:-7px;margin-left:-12px;margin-top:-2px;box-sizing:content-box}.td_player_container .ui-slider-horizontal .ui-slider-range{top:0;height:100%}.td_player_container .ui-slider-horizontal .ui-slider-range-min{left:0}.td_player_container .ui-slider-horizontal .ui-slider-range-max{right:0}.td_player_container .ui-slider-vertical{width:6px;height:100px}.td_player_container .ui-slider-vertical .ui-slider-handle{left:-13px;margin-left:0;margin-bottom:-10px}.td_player_container .ui-slider-vertical .ui-slider-range{left:0;width:100%}.td_player_container .ui-slider-vertical .ui-slider-range-min{bottom:0}.td_player_container .ui-slider-vertical .ui-slider-range-max{top:0}\n",""]),e.exports=t},function(e,t,n){"use strict";(function(t){var i=n(24),r=n(25),o=n(26);e.exports=function(e){var n,a,u=[],l=1;if("string"==typeof e)if(i[e])u=i[e].slice(),a="rgb";else if("transparent"===e)l=0,a="rgb",u=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var c=(p=e.slice(1)).length;l=1,c<=4?(u=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===c&&(l=parseInt(p[3]+p[3],16)/255)):(u=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===c&&(l=parseInt(p[6]+p[7],16)/255)),u[0]||(u[0]=0),u[1]||(u[1]=0),u[2]||(u[2]=0),a="rgb"}else if(n=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var d=n[1],f="rgb"===d,p=d.replace(/a$/,"");a=p;c="cmyk"===p?4:"gray"===p?1:3;u=n[2].trim().split(/\s*,\s*/).map((function(e,t){if(/%$/.test(e))return t===c?parseFloat(e)/100:"rgb"===p?255*parseFloat(e)/100:parseFloat(e);if("h"===p[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==s[e])return s[e]}return parseFloat(e)})),d===p&&u.push(1),l=f||void 0===u[c]?1:u[c],u=u.slice(0,c)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(u=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),a=e.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(e))if(r(e)){var h=o(e.r,e.red,e.R,null);null!==h?(a="rgb",u=[h,o(e.g,e.green,e.G),o(e.b,e.blue,e.B)]):(a="hsl",u=[o(e.h,e.hue,e.H),o(e.s,e.saturation,e.S),o(e.l,e.lightness,e.L,e.b,e.brightness)]),l=o(e.a,e.alpha,e.opacity,1),null!=e.opacity&&(l/=100)}else(Array.isArray(e)||t.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(e))&&(u=[e[0],e[1],e[2]],a="rgb",l=4===e.length?e[3]:1);else a="rgb",u=[e>>>16,(65280&e)>>>8,255&e];return{space:a,values:u,alpha:l}};var s={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this,n(23))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){"use strict";var i=Object.prototype.toString;e.exports=function(e){var t;return"[object Object]"===i.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}},function(e,t){e.exports=function(){for(var e=0;eCopy log'),r()("#"+i).click((function(){d()(r()(t).text())}))),"object"==f(e)&&(e=JSON.stringify(e)),n.append(e+"\n")}else console.log(e)}}var h=n(9),g=n.n(h),v=n(5),m=n.n(v),y=n(10),b=n.n(y),x=n(11),_=n.n(x);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;nLoading'},this.button_states[this.STATUS.LOADING]={class:"loading",content:m.a+'
Starting
'},this.button_states[this.STATUS.PLAYING]={class:"playing",content:_.a+'
Stop
'},this.button_states[this.STATUS.STOPPED]={class:"stopped",content:b.a+'
Play
'},this.cookie_expiration=new Date("December 31, 9999 01:01:00")}},{key:"init_volume",value:function(){var e=this;this.volume_settings=s.a.getJSON()["ktoo-stream-volumes"]?s.a.getJSON()["ktoo-stream-volumes"]:{};var t=75;this.volume_settings&&(this.volume_settings[this.station]>=0&&this.volume_settings[this.station]<=100?t=Math.max(15,this.volume_settings[this.station]):this.volume_settings.default&&(t=Math.max(15,this.volume_settings.default))),this.update_volume(t),this.conditional_volume((function(){r()("#"+e.player_id+" .volume-slider").slider({value:e.volume,slide:function(t,n){e.update_volume(n.value)}})}))}},{key:"init_elements",value:function(){var e=this;r()("#"+this.player_id).wrapInner("
"),r()("#"+this.player_id).prepend(g.a),l(this.player_id),this.conditional_volume((function(){r()("#"+e.player_id+" .volume-slider-container").show()})),r()("#"+this.player_id).addClass("td_player_container"),this.td_container_id="td_container_"+Math.floor(1e4*Math.random()),r()("#"+this.player_id+" .td_container").attr("id",this.td_container_id),this.set_player_state("initializing")}},{key:"conditional_volume",value:function(e){var t=new Audio;t.addEventListener("volumechange",(function(t){e&&e()})),t.volume=.76543}},{key:"update_volume",value:function(e){this.volume=e,this.player&&"function"==typeof this.player.setVolume&&this.player.setVolume(e/100),this.volume_settings&&"object"==w(this.volume_settings)||(this.volume_settings={}),this.volume_settings[this.station]=e,this.volume_settings.default=e,s.a.set("ktoo-stream-volumes",this.volume_settings)}},{key:"get_volume",value:function(){return this.volume}},{key:"init_player",value:function(){var e=this,t={coreModules:[{id:"MediaPlayer",playerId:this.td_container_id,geoTargeting:!1,techPriority:["Html5","Flash"],audioAdaptive:!0}],playerReady:function(){e.on_player_ready()},configurationError:function(){e.on_player_error()},moduleError:function(){e.on_player_error()}};this.player=new TDSdk(t),p("Player initialized; TDSdk: "),p(this.player)}},{key:"set_player_state",value:function(e){p("set_player_state: "+e),r()("#"+this.player_id+" .transport-button").html(this.button_states[e].content),r()("#"+this.player_id+" .transport-button").attr("class",this.button_states[e].class+" transport-button"),this.player_state=e}},{key:"on_player_ready",value:function(){var e=this;p("on_player_ready"),this.set_player_state(this.STATUS.STOPPED),this.player.addEventListener("stream-status",(function(t){e.on_status_change(t)})),r()("#"+this.player_id+" .transport-button").click((function(){switch(p("Transport clicked; state: "+e.player_state),e.player_state){case e.STATUS.STOPPED:p("player.setVolume"),e.player.setVolume(e.get_volume()/100),p("player.play; station: "+e.station),e.player.play({station:e.station}),p("done");break;case e.STATUS.LOADING:case e.STATUS.PLAYING:p("player.stop"),e.player.stop();default:p("Other state: "+e.player_state)}})),this.conditional_volume((function(){l(e.player_id),r()("#"+e.player_id+" .volume-slider").show(),e.player.setVolume(e.volume/100),r()("#"+e.player_id+" .volume-slider").slider({value:100*e.player.getVolume()})}))}},{key:"on_status_change",value:function(e){switch(p("on_status_change"),p(e),e.data.code){case"LIVE_PAUSE":case"LIVE_STOP":this.set_player_state("stopped");break;case"LIVE_BUFFERING":case"LIVE_CONNECTING":case"LIVE_RECONNECTING":case"GETTING_STATION_INFORMATION":this.set_player_state("loading");break;case"LIVE_PLAYING":this.set_player_state("playing")}}},{key:"on_player_error",value:function(e){p(object),p(object.data.errors)}}])&&C(t.prototype,n),i&&C(t,i),e}(),T="livestream_player";r()(document).ready((function(){r.a.getScript("//sdk.listenlive.co/web/2.9/td-sdk.min.js").done((function(e,t){p("SDK get done"),p("player_id: "+T),new k(T)}))}))}]); \ No newline at end of file diff --git a/src/initialize_customization.js b/src/initialize_customization.js index 23b08e3..ad46058 100644 --- a/src/initialize_customization.js +++ b/src/initialize_customization.js @@ -23,21 +23,21 @@ export function initialize_customization (player_id) { // transport (play/pause) button $('#' + player_id + ' .transport-button').css({ - backgroundColor: background_color, + background: background_color, color: foreground_color, stroke: foreground_color, fill: foreground_color }); // slider track - $('#' + player_id + ' .ui-slider').css('background-color', alpha (foreground_color, 0.5)); + $('#' + player_id + ' .ui-slider').css('background', alpha (foreground_color, 0.5)); // slider handle $('#' + player_id + ' .ui-slider .ui-slider-handle').css({ boxShadow: 'none', border: '2px solid ' + background_color, //marginTop: 0, - backgroundColor: foreground_color + background: foreground_color }); } @@ -49,13 +49,13 @@ export function initialize_customization (player_id) { $('#' + player_id + ' .transport-button').hover(function() { $(this).css ({ - backgroundColor: background_color_hover, + background: background_color_hover, color: foreground_color_hover, stroke: foreground_color_hover, fill: foreground_color_hover }); - }, default_attributes); + }, default_attributes); /* Apply foreground colors and highlighting border to the volume handle on focus */ @@ -65,7 +65,7 @@ export function initialize_customization (player_id) { //border: '2px solid ' + background_color, //marginTop: '-2px', //marginLeft: parseFloat ($(this).css('margin-left')) - 2 + 'px', - backgroundColor: foreground_color_hover + background: foreground_color_hover }); }); diff --git a/src/scss/slider.scss b/src/scss/slider.scss index 4648798..9c7ea1a 100644 --- a/src/scss/slider.scss +++ b/src/scss/slider.scss @@ -23,7 +23,7 @@ .ui-slider { position: relative; text-align: left; - + border:none; background-color: $track_color;