Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hackergrrl/youtubedl-cast

:tv: Send videos on tabs to your TV with youtube-dl and a bookmarklet.
https://github.com/hackergrrl/youtubedl-cast

Last synced: 1 day ago
JSON representation

:tv: Send videos on tabs to your TV with youtube-dl and a bookmarklet.

Awesome Lists containing this project

README

        

# Woah woah woah
This is still in pre-release development. You probably shouldn't use this unless
you like pain.

## What is this?
Cast tabs with videos to a server hooked up a TV using bookmarklets!

## Wha? Cast videos to a server?
Install **youtubedl-cast** to your handy [Raspberry Pi]() or server hooked up
to your TV and send videos to it from any [youtube-dl compatible page]().

## Using bookmarklets?
Proprietary vendor plugin systems like Chrome extensions and Firefox add-ons
are lame and non-portable: [embed javascript in bookmarklets]() for easy,
browser agnostic functionality! One click to play the current tab's video on
your TV!

## Installation
```
$ npm install -g youtubedl-cast

$ youtubedl-cast
```

### generate key + cert

TODO: key/cert generation for https

## Cast videos: bookmarklet
Paste the following bookmarklet verbatim as a new bookmark in your browser of choice:

```
javascript:var SERVER="https://localhost:9100";var request = new XMLHttpRequest(); var url = encodeURIComponent(location.href); request.open("GET", SERVER+"/play/"+url, true); request.onreadystatechange = function() { var done = 4, ok = 200; if (request.readyState == done && request.status == ok) { if (request.responseText) { alert(request.responseText); } } }; request.send(null);
```

Don't forget to replace the value of `SERVER` with the IP:port tuple of your choosing.

## HTTP API
**youtubedl-cast** exposes a simple HTTP interface:

`/play/:url`plays the media at the provided `:url` (url-encoded)

(more routes forthcoming)

## License
BSD