|
6 years ago | |
---|---|---|
assets | 8 years ago | |
bin | 7 years ago | |
lib | 7 years ago | |
spec | 7 years ago | |
.gitignore | 8 years ago | |
Gemfile | 7 years ago | |
Gemfile.lock | 7 years ago | |
LICENSE | 8 years ago | |
README.md | 7 years ago | |
tubemp.gemspec | 6 years ago |
YouTube embeds without third party trackers.
tubemp is a tiny web-application which creates and serves thumbnail-images from YouTube embed-codes. These images link to the video and look like embedded videos.
It offers a replacement for embedding YouTube videos on your site. A replacement without third-party cookies and tracking “bugs” following your visitors.
Many countries (most notably the E.U-countries) don’t allow third party trackers on many of their sites. Many site-owners don’t want to place content on their websites that allows companies like Google to track their visitors.
Placing an image that looks like a YouTube embed, but served from your own domain, is a good solution for all this.
This tiny application aids in that.
A demo installation can be found at http://tubemp.webschuur.com. NOTE that this is a demo; images will be wiped; when you include them from this service on your website, you will see broken images on your website at some point.
A hosted version is being developed and will replace the demo.
Example code:
<a href="http://www.youtube.com/watch?v=D80QdsFWdcQ"><img src="http://tubemp.webschuur.com/thumbs/D8/D80QdsFWdcQ_overlay.png" alt="Tony Tribe , Red Red Wine"/></a>
$ gem install tubemp
$ tubemp
todo.
You can get the result as JSON by adding .json
to the tags page:
curl http://tubemp.example.com/tags.json?v=<youtube-id>
This returns a hash with the variations of the tags. For example, in PHP:
php > print_r(json_decode(file_get_contents("http://tubemp.example.com/tags.json?v=D80QdsFWdcQ")));
stdClass Object
(
[basic] => <a href="http://www.youtube.com/watch?v=D80QdsFWdcQ"><img src="http://localhost:9393/thumbs/D80QdsFWdcQ.png" alt="Tony Tribe , Red Red Wine"/></a>
[overlay] => <a href="http://www.youtube.com/watch?v=D80QdsFWdcQ"><img src="http://localhost:9393/thumbs/D80QdsFWdcQ_overlay.png" alt="Tony Tribe , Red Red Wine"/></a>
)
Bundler installs everything, but for reference: