-
Notifications
You must be signed in to change notification settings - Fork 18
eventlistener #1
Comments
Thanks for trying to use my module. var Control = require('net.hoyohoyo.tiremotecontrol');
Control.addEventListener('remotecontrol', function(e) {
Ti.API.debug('remote control event was fired!');
switch (e.subtype) {
case Control.REMOTE_CONTROL_PLAY_PAUSE:
// code executing when clicked play-pause media button
break;
}
}); |
hi, thanks for your reply, actually when I try to use multiple events like the PLAY event and the PAUSE event it doesnt do anything Control.addEventListener('remotecontrol', function(e) {
} Thanks for tring to use my widget. How about the following code sample? var Control = require('net.hoyohoyo.tiremotecontrol'); — |
I see that you want to do. var isPlaying = false;
var Control = require('net.hoyohoyo.tiremotecontrol');
Control.addEventListener('remotecontrol', function(e) {
Ti.API.debug('remote control event was fired!');
switch (e.subtype) {
case Control.REMOTE_CONTROL_PLAY_PAUSE:
if (isPlaying) {
// code executing when clicked play-pause media button on playing
} else {
// code executing when clicked play-pause media button before playing
}
isPlaying != isPlaying;
break;
}
}); |
Added ability to set albumArtwork via URL fo locksceen info
hi, i don't understand how to add an event on click play-pause media buttons.
thanks in advance
The text was updated successfully, but these errors were encountered: