#Popcorntime remote for #iOS @popcorntimetv @giacomocerquone
Getting off your sofa is far too much exercise some days, and if you have popcorn time running on the mac, and just slightly out of reach, you really need something to remotely control it.
I found an app on the Android app store to control it, but I didn’t find an equivalent on the IOS. So I decided to write my own.
Which you can download here:
https://itunes.apple.com/us/app/popcorn-remote/id1290119967?ls=1&mt=8&at=1000l9tW
So, first, pairing. The easiest way to do this is to go to Settings > Show Advanced Settings > Remote Control, Create Pairing QR code. this generates a code like this
To Save you running a QR scanner on that, it decodes to {“ip”:”192.168.1.249″,”port”:”8008″,”user”:”popcorn”,”pass”:”popcorn”} – obviously the IP is dependant on your network.
Then I downloaded a Javascript library by Giacomo Cerquone, called Butter_remote.js
And wrote a little HTML like this;
http://butter_remote.js
https://code.jquery.com/jquery-1.12.4.min.js$(init);
function init()
{
butter_remote.init(
{
username: “popcorn”,
password: “popcorn”,
ip: “127.0.0.1”,
port: “8008”,
debug: “false”
}
);
$(“#btnPlayPause”).bind(“click”,function playPause(){
butter_remote.toggleplaying();
});
$(“#btnForward”).bind(“click”,function playPause(){
butter_remote.right();
});
$(“#btnBack”).bind(“click”,function playPause(){
butter_remote.left();
});
}Play/Pause
Forward
Back
Then just to wrap that in a Cordova/Phonegap app, and install it on my phone 🙂