update_ui('init');
tcpclient = new TcpClient(host, port);
- tcpclient.connect(function() {
+ tcpclient.connect(function(resultCode) {
+ if (resultCode < 0) {
+ update_ui('error', resultCode);
+ return;
+ }
+
var mpc_sender = new TcpClientSender(tcpclient);
tcpclient.addResponseListener(tramp_mpc_recv);
mpc = new Mpc(mpc_sender, update_ui);
ui_mpc_status.innerText = ({
'disconnect': 'Disconnecting...',
'init': 'Connecting...',
+ 'error': 'Connection error ' + cmd,
})[state];
return;
}
"manifest_version": 2,
"minimum_chrome_version": "24",
"name": "Music Player Client",
- "version": "3.1",
+ "version": "3.2",
"description": "Control a Music Player Daemon (MPD)",
"icons": {
"128": "images/icon-128x128.png"