Home > Uncategorized > #Popcorntime remote for #iOS @popcorntimetv @giacomocerquone

#Popcorntime remote for #iOS @popcorntimetv @giacomocerquone

popcorn-time

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.

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

Untitled

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 🙂

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: