/** * @author Wouter van Wijk * * these functions communication with ws server * */ /******************************************************** * process results of a (new) currently playing track *********************************************************/ function processCurrenttrack(data) { // console.log(data); setSongInfo(data); } /******************************************************** * process results of volume *********************************************************/ function processVolume(data) { if (!volumeChanging) { setVolume(data); } } /******************************************************** * process results of a repeat *********************************************************/ function processRepeat(data) { setRepeat(data); } /******************************************************** * process results of random *********************************************************/ function processRandom(data) { setRandom(data); } /******************************************************** * process results of current position *********************************************************/ function processCurrentposition(data) { var pos = parseInt(data); setPosition(pos); } /******************************************************** * process results playstate *********************************************************/ function processPlaystate(data) { if (data == 'playing') { setPlayState(true); resumePosTimer(); } else { setPlayState(false); } } /******************************************************** * process results of a browse list *********************************************************/ function processBrowseDir(resultArr) { /*