AudioPlayer.prototype.volume = function ( value ) { var volume = Point.clamp(value, 0.0, 1.0); if ( this.vol != volume ) { this.vol = volume; this.emit("volume", this.getItem(), volume); } if ( this.audio ) { this.audio.volume = this.vol; } return this.vol; };
AudioPlayer.prototype.seek = function ( percent ) { if ( !this.audio || this.audio.error ) return; percent = Point.clamp(percent, 0.0, 1.0); this.audio.currentTime = percent * this.audio.duration; };