Utility/Web app to 'send' YouTube video to Kodi
#1
Hi guys,

I've been a happy user of Kodi for a little while and use almost exclusively the official Kodi app (iOS) on my phone to control it. This works great for me apart from YouTube, the UX of the plugin through the Kodi remote app is not great and it doesn't fit my use case of when I'm watching a video on my phone but then want to then send it to Kodi. (Trying to search YouTube without a keyboard is also a nightmare)

I wanted a really easy way to achieve this and although I think some good options exist on Android or Desktop I couldn't find anything for iOS.

So I decided to build something and I'm pretty happy with the results so just wanted to share with the community in case someone else might find it useful.

It's a web app written with php/javascript, designed for use as an iOS pseudo-app (browse to the page in Safari - then click add to Home Screen), but should work from any js capable browser:

watch gallery


It's dead easy to use. Copy a youtube URL from wherever you want (app/desktop/share/email/IM, etc) and paste into the box at the top. Clicking GO will fetch the title and thumbnail for confirmation. Clicking Play will start that video on Kodi. Done! I also added a History page which will let you replay any video you started with the app.

I haven't productionized the code so there are a few things to config/check but it's all pretty straightforward, only a few files (longest file is 60 lines!):
* In youtube_play.php modify the URL to point at your Kodi server
* Modify the path to the history file in all the php files (apart from index.php) -- yes, yes I know it should be parameterised somewhere!
* There's a regex which picks up the two types of YouTube URL I was seeing during my testing - you may need to add others

Put all the files into a single directory on a php capable web server (make sure php_curl library is enabled/installed) on your home network and browse to it from your phone or device

Hope it's useful to someone!

Link to source
Reply
#2
Thread moved to supplementary tools section.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
Utility/Web app to 'send' YouTube video to Kodi0