khloke / play-to-xbmc-chrome

A Google Chrome Extension for sending online content to be played on XBMC. Supported websites include YouTube, Vimeo, CollegeHumor, DailyMotion, eBaumsWorld and SoundCloud.
MIT License
186 stars 112 forks source link

add hulu #8

Closed yultide closed 11 years ago

yultide commented 11 years ago

add hulu support. requires this particular commit in the plugin.

https://github.com/yultide/BlueCop-XBMC-Plugins/commit/71688a4e6e5ee8b972d6e2012b138e1ad3b93757

khloke commented 11 years ago

Hi Yulius,

Can the Hulu plugin not accept a content_id of sorts that can be taken from the URL? Needing a specific commit for the Hulu plugin to work is a little troublesome.

-khloke

yultide commented 11 years ago

The hulu plugin will work if we can pass the content_id in the HTML of the hulu page without a need for patching. The patch simply fixes a HTML parse problem on the plugin side because hulu's html changed.

For example if you look at http://www.hulu.com/watch/534503 HTML source, you'll see the real video id id is 60267762. If you can't find it, look for 'content_id'.

If you have both, the url to launch the video using the XBMC json api is. {"item" :{ "file" : "plugin://plugin.video.hulu/?url=\"60267762\"&mode=\"TV_play\"&videoid=\"534503\"" }}, "id" :1}

I currently don't know how to get the 60267762 number in the chrome plugin. If you know how to do it, let me know. Otherwise, I can keep bugging the bluecorp guy to accept the patch.

Thanks for your time.

khloke commented 11 years ago

Right I see, that's cool then. I'll have a look and add in the additional stuff for grabbing the video id. Thanks for clarifying that.

Cheers, khloke