Sunday 30 May 2010

Feeding an example video

My first attempt to do something "interesting" was to intercept the youtube plugin and force it to point to a different video somewhere else on the web. Looking at what is downloaded, we can see that one of the files downloaded is vieracast.eu/youtube/featured. This file contains a list of the "featured" videos in a feed. If we replace this, we can point the youtube player to other media.

Create the file /var/www/vieracast.eu/youtube/featured to contain: -

[
{"title": "This is the title",
"author":"nobody",
"views":1,
"rating_average":5,
"rating_max":5,
"duration":1,
"thumb0":"http://myserver.com/0.jpg",
"thumb1":"http://myserver.com/1.jpg",
"thumb2":"http://myserver.com/2.jpg",
"thumb3":"http://myserver.com/3.jpg",
"content":"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4",
},
]


Then run the youtube plugin, choose featured, and there will be just your one video (with no thumbnail since the URL's are bogus). View the video and it plays the video stored in "content"!!!

This is only a hack and an ultimate solution would have a separate plugin, but it proves the theory.

1 comment:

  1. woo! I succeeded in doing this too.

    I've been poking around trying to customise the home page, trying to see how I can create my own little app.

    however, I'm not sure what I'm doing wrong but now my TV has decided that it needs a software update whenever I start vieracast, so I have to have the interception disabled when I start vieracast, and then turn it on when the home page has loaded!!

    the data that vieracast requests from the server seems to be json, so I reckon it should be possible to add a new application/service, given enough time and dedication!

    ReplyDelete