with_hop( hop_service_url_varargs( url, Splay, 0 ) ); 
with_hop( hop_service_url_varargs( url, Splay, 0 ), err ); 
function HopAudioServerProxy( audio, url ) {   var o = new HopAudioProxy();   var current_duration = false;   var current_position = 0;   var current_volume = 0;   var current_pan = 0;   var current_metadata = false;   var playlist = null;   var playlist_index = -1;   o.playlist_play = function( index ) {      with_hop( hop_service_url_varargs( url, Splay, index ) );   }      o.play = function( start ) {      with_hop( hop_service_url_varargs( url, Splay, 0 ) );   };   o.stop = function() {      with_hop( hop_service_url_varargs( url, Sstop ) );   };   o.pause = function() {      with_hop( hop_service_url_varargs( url, Spause ) );   };   o.load = function( l ) {      with_hop( hop_service_url_varargs( url, Sload, l ),		function() { hop_audio_run_hooks( audio, "load" ); } );   };   o.position_get = function() {      return current_position;   };   o.position_set = function( p ) {      with_hop( hop_service_url_varargs( url, Sposition, p ) );   };   o.pan_get = function() {      return current_pan;   };   o.pan_set = function() {      with_hop( hop_service_url_varargs( url, Span, s ) );   };   o.volume_get = function() {      return current_volume;   };   o.volume_set = function( val ) {      with_hop( hop_service_url_varargs( url, Svolume, val ) );   };   o.duration_get = function() {      return current_duration;   };   o.metadata_get = function() {      return current_metadata;   };   o.playlist_get = function() {      return playlist;   }   o.playlist_set = function( playlist, autorun ) {      with_hop( hop_service_url_varargs( url, Splaylist, playlist ),		autorun ? function( h ) { o.playlist_play( 0 ) } : false );   }   o.playlist_index_get = function() {      return playlist_index;   }   o.event = url;   o.event_listener = function( e ) {      if( sc_isPair( e.value ) ) {	 var k = e.value.car;	 var rest = e.value.cdr;	    	 if( k === Splay ) {	    // play	    audio.paused = false;	    current_duration = rest.car;	    current_position = rest.cdr.car;	 } else if( k == Spause ) {	    // pause	    audio.paused = true;	    current_duration = rest.car;	 } if( k == Sstop ) {	    // stop	    audio.paused = false;	    current_duration = rest.car;	 } else if( k == Svolume ) {	    // volume	    current_volume = rest.car;	 } else if( k == Smeta ) {	    // meta (and playlist)	    var val = rest.car;	    var plist = rest.cdr.car;	    var plindex = rest.cdr.cdr.car;	    playlist = plist;	    playlist_index = plindex;	    	    if( typeof val == "string" ) {	       current_metadata = {	       title: sc_basename( val ),	       artist: sc_basename( sc_dirname( sc_dirname( val ) ) ),	       album: sc_basename( sc_dirname( val ) )	       };	    } else if( val ) {	       current_metadata = val;	    }	 }	 	 hop_audio_run_hooks( audio, sc_symbol2string_immutable( k ) );      }      return;   }   // install the server listener...   hop_add_event_listener( o.event, "server", o.event_listener );   // ... and starts the server event notification   hop_add_event_listener( document, "serverready", function() {	 with_hop( hop_service_url_varargs( url, Sready ) );      } );      return o;}
4636	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4636/38fec00cfcfe652797e9df2f30433341b486990b/hop-audio.js/clean/share/hop-audio.js