How can i use Player widget in nodeJS?

How can i use Player widget in node???
is there any example or similar example.
is it true?

v22.on('write', function(param) {
	if (param[0] == 'play') {
		child = exec('COMMAND',
);
	}
	else if (param[0] == 'stop') {
		child = exec('COMMAND',
);
	}
	else if (param[0] == 'next') {
		child = exec('COMMAND',
);
	}
	else if (param[0] == 'prev') {
		child = exec('COMMAND',
);
	}
});

Hello. Yeap. Looks fine. You may also try console.log(param[0]) just to be sure.

1 Like

How can i simulate this action code on Node???

BLYNK_CONNECTED() {
    Blynk.syncVirtual(V0, V1);
  } 

Lots of Node and JS information, examples and such on this Github page…

Based on some of what I just skimmed through, probably something like this (completely untested and possibly pulled straight out of my… imagination :wink: )

var v0 = new blynk.VirtualPin(0);
var v1 = new blynk.VirtualPin(1);

blynk.on('connect', function() {
  blynk.syncVirtual(V0, V1);
});
1 Like

@Gunner Thank you so how is it for all pins?

Take a look at those library examples… I pulled my guess from a sync all reference.

it doesn’t work.

Yup… so now, armed with some references of other commands (in the Github link provided) play around with the syntax until it does… :wink:

1 Like