

Apple TV for Torrent Streaming in JS - shacharz
https://github.com/SamyPesse/tv.js

======
mnutt
I also thought this was for Apple TV. Even though it isn't, it's theoretically
possible to write apps that you control through your Apple TV by taking over
one of the existing apps that you don't use. MLB is one of a few good
candidates. Many of Apple TV's "apps" are actually javascript apps, though
unfortunately they aren't just running a WebView.

When you load the MLB app, it requests javascript and assets from mlb.com and
operates on some sort of XML document rather than an HTML DOM. At my office we
use 3rd-gen Apple TVs for AirPlay presentations, and I did some experiments
with making a custom app that showed a rotating list of clients. We used a
Raspberry Pi that functioned as both webserver and DNS, then pointed the Apple
TVs' DNS at the Pi to reroute all requests going to mlb.com.

~~~
conradev
I'm curious as to how this works - did you happen to write anything up about
that endeavor? There are endless applications to writing web apps for an Apple
TV.

(In addition, the second generation Apple TV can be jailbroken and the
relevant software reverse engineered if there is anything unclear in what you
discovered thus far)

~~~
greg5green
I don't know if he had written anything up, but PlexConnect
([https://github.com/iBaa/PlexConnect](https://github.com/iBaa/PlexConnect))
uses a similar process to serve Plex up to the AppleTV via the Trailers app.

~~~
conradev
Sweet, thanks! I used Apple Configurator to configure a proxy on my Apple TV,
and am taking apart the apps that are grabbed over HTTP. Cool stuff!

------
AaronO
Hi there, I'm one of the two creators of TV.js

It's nice to see it get some love on HN, given that we just hacked it together
from "scratch" yesterday.

I just wanted to clarify a few things briefly, this application is not
intended to run on an Apple TV, it's meant to run on Desktops, Laptops and
Raspberry PIs.

There's obviously a lot of room for improvement but as of now it works well,
but the install process is relatively tedious (ok for developers, not so for
others).

The application uses node-webkit to run as an App, we will possibly distribute
bundled versions of this in the future.

And for those who may be asking, this is not our Startup, it's just a nice
hack, we put together during our own personal Hackathon :)

~~~
Amadou
If you have any control over that web page you need to get those over-sized
PNGs resized and re-encoded to jpgs. They are 2MB each, they could be about
100KB and do just as good a job at being scaled-down thumbnails. You are
burning bandwidth - 8MB just to load the page.

~~~
AaronO
I just resized them there now.

------
nobodyshere
The title appears to be a bit misleading. This isn't a mod for Apple TV,
unfortunately, and requires other hardware.

~~~
shacharz
Yea, although you can install it on other smart TV's

~~~
weego
I think it is wise to clarify that by smart tv you mean an HTPC or media
center, not the actual Smart TV system as used by the likes of Samsung and LG
as this is not a Smart TV app.

------
nimbusvid
Does it support seeking? That was one of the more painful parts to implement
when I wrote
[https://news.ycombinator.com/item?id=6006334](https://news.ycombinator.com/item?id=6006334)

Downloading from a cloud service provider is more consistent and will probably
provide a better experience for most people. But the use case is a bit
different: The site linked above is not designed to search or widely share
files but only to play them from cloud storage.

------
tlrobinson
What does this have to do with Apple TV?

~~~
grimtrigger
Its a similar use case. Could of been titled "Roku for Torrent Streaming in
JS". As an unhappy apple TV owner, I was disappointed.

~~~
joezydeco
Unhappy Apple TV owner? That's not possib...oh wait. Count me in.

Do you notice that streaming _anything_ over in-home sharing is just plain
broken? I've got everything in the house talking on 802.11n but trying to play
a movie off the Mac just...takes....forever...to buffer?

~~~
MWil
I switched from an Apple TV gen 2 and even the hackability with firecore
didn't make up for all the issues I had. I knew within 5 minutes of using my
Roku 3 that I had made the right decision (plus I sold the atv on ebay for a
hefty markup so it actually paid to make the mistake).

------
leoplct
Which JS Torrent library did you have used to download torrent?

~~~
kh_hk
Looks like peerflix:
[https://github.com/AaronO/peerflix](https://github.com/AaronO/peerflix)

------
islon
Now if only it could download subtitles from subscene...

------
leoplct
Is there a way to download a torrent and stream it a video instantanely in
Javascript?

------
harrisonpowers
Torrent streaming is nothing new, but this is a great implementation.

------
kamakazizuru
Is it possible to configure this to stream through my proxy server?

------
whadar
I wonder if sharefest.me can play in this game :)

------
xetorthio
amazing work! it would be even better if we could stream tv shows :)

------
orenbarzilai
great project & good implementation. very nice!

------
camus
"Disclaimer

There are obvious legal issues, with downloading copyrighted material you do
not have a license for. We do not endorse such use cases and bare no
responsability for the use people make of it."

ah ah ah ... well you are not doing anythin illegal i guess but :

\- studios could take down your repo since you used copyrighted material (
movie posters ).You should change them ( us CC movies like blender short
movies ).

\- you are using Apple brand and associating it with an illegal activity ,they
could sue you for that.

I love the idea of using the phone as a remote control , that's really smart !
i'm going to steal that idea for sure !

But could it work online ? i mean if the website is not on a localhost ?

~~~
alexhawdon
Phone as remote control is great - OP might want to think about QR-code as a
quick method of inputting the URL. I believe this is how YouTube remote
control works.

A further improvement might be to use OPs internet-connected server to proxy
the commands so the phone doesn't have to be connected to the same WiFi
network, though I accept this is a very limited use-case and incurs some cost.

EDIT: Also - good work, OP!

