line-height: 13px;
}
-.ts-skin-lab .ts-player .ts-viewer .ts-pointer {
+.ts-skin-lab .ts-player .ts-viewer { /*.ts-pointer {*/
color: #3c4251;
background: #e7e7e7;
}
+.ts-pointer{
+ border: 1px solid #B0C4DE !important;
+ -moz-border-radius: .5ex !important;
+ -webkit-border-radius: .5ex !important;
+ border-radius: .5ex !important;
+ color: #006666 !important;
+}
.ts-skin-lab .ts-player .ts-ruler .ts-section .ts-label {
color: #c3c2cc;
background: #2a3242;
background-image: url('img/volume.png');
background-repeat: no-repeat;
background-position: 0px 0px !important;
- width:160px !important;
+ width:60px !important;
}
.ts-skin-lab .ts-player .ts-control .ts-playback .ts-play {
this.elements.pause.attr('href', '#').bind('click', this.attach(this._onPause));
this.elements.play.attr('href', '#').bind('click', this.attach(this._onPlay));
//
- this.elements.volume.attr('href', '#').bind('mousedown', this.attach(
+ this.elements.volume.attr('href', '#').click(function(){return false;}).bind('mousedown', this.attach(
function(e){
- this.changeVolume(e);
+ if(e.which===1){ //left button
+ this.changeVolume(e);
+ }
+ return false;
}
));
resizeTimer = setTimeout(this.attach(this.resize), 100);
}));
//_updateVolumeChanged(this.soundProvider.getVolume());
- this.soundProvider.observe('volume',this.onVolumeChanged);
+ this.soundProvider.observe('volume',this.attach(this.onVolumeChanged));
//this.container.resize(this.attach(this.resize)); // Can loop ?
},
var vol = event.layerX;
for(var i=0; i<ticks.length; i++){
if(vol<=ticks[i]){
- var index = i;
+ //var index = i;
var volume = i*20;
this.soundProvider.setVolume(volume);
return false;
},
updateVolumeAnchor: function(volume){
- var indices = [20,40,60,80,100];
+ var indices = [20,40,60,80,100,100000];
for(var i=0; i <indices.length; i++){
if(volume<indices[i]){
- this.elements.volume.css('backgroundPositionY',-28*(indices.length-i));
+ var pos = -28*i;
+ pos = '0px '+ pos+ 'px !important';
+ this.elements.volume.css('backgroundPosition',pos);
+ return;
}
}
- this.elements.volume.css('backgroundPositionY',0)
+ // this.elements.volume.css('backgroundPosition','0px 0px !important')
},
play: function() {
if (this.sound) {
+ //it seems that, if sound is played until its end
+ //playing sound again resets the volume to 100, even though
+ //sound.volume is at the right value. We use this trick which seems to work:
+ this.sound.setVolume(this.sound.volume);
if (!this.sound.playState) {
this.sound.play();
+ //console.log(this.getVolume());
} else if (this.sound.paused) {
this.sound.resume();
}
},
getVolume: function() {
- return this.sound.volume;
+ return this.sound.volume;
},
seek: function(offset) {