xbmc / Official-Kodi-Remote-iOS

Full-featured remote control for XBMC Media Center. It features library browsing, now playing informations and a direct remote control.
Other
222 stars 104 forks source link

Feature Request: Cast/Share YouTube to Kodi #89

Open rlue opened 6 years ago

rlue commented 6 years ago

I spent the last few days searching for a way to cast a YouTube video from an iPhone to a Kodi instance. On Android devices, YouTube videos (along with those from other third-party sites, like vimeo) can be cast to Kodi via the video's "Share..." menu, as long as the target platform's add-on has been installed.

I've installed the official Kodi Remote for iOS (by joethefox) via the App Store, and don't see any similar functionality under the "Share" menu.

Any chance this feature might be implemented in the future?

Gaffen commented 2 years ago

I've also been researching this. Is it possible using altstore, potentially? My other solution is to set up an mqtt server and attempt to write some scripts for a home automation style solution; doesn't seem ideal though!

kambala-decapitator commented 2 years ago

@rlue @Gaffen could you give some details regarding this feature? E.g. list exact steps on android. From the description I don't quite understand what's the desired effect and how you imagine the flow. Simply make Kodi instance play a YouTube video that's currently opened in mobile browser?

rlue commented 2 years ago

Sorry, can't chime in on this anymore as I no longer use Kodi ¯\_(ツ)_/¯

Gaffen commented 2 years ago

Hey @kambala-decapitator, of course!

I'm not sure if this is necessarily a Kodi Remote issue so if the solution is elsewhere that's fine.

On android, the flow is as follows:

  1. Open YouTube (or NewPipe app in my case),
  2. Open share dialogue on video
  3. 'Kore' from the share drawer.

The same can be done from the browser, but it's usually more convenient to use the dedicated app.

By comparison, to share from iPhone, the process appears to be one of the following:

  1. Open in browser
  2. Share page
  3. Tap on 'more options' for share
  4. Find the paid 'Play on Kodi' app - video starts playing

Using the app:

  1. Open in youtube app
  2. Share video
  3. Copy link to video
  4. Open 'Play on Kodi'
  5. Tap 'play link from clipboard' - video starts playing

I'm not entirely sure why the 'share' function in the youtube app, this is why I was thinking it might be possible from a custom youtube client using altstore. However it would be nice to be able to share straight to the Kodi remote app directly, whether from browser or app.

Happy to discuss solutions. I'd like to get to the point where it's as convenient for others to share to kodi as it is for me, at the moment I get judged a little for dominating the play queue 😅. No worries if it's out of the scope of this project!

kambala-decapitator commented 2 years ago

@Gaffen thanks! Now I understand what you want to achieve.

Sounds like a good feature for our Remote and shouldn't be difficult to implement. Making people pay for such a simple thing is meh...

Regarding the iOS YT app, this would need some investigation to figure out what it tries to share to avoid manual link pasting like you currently do.

Gaffen commented 2 years ago

Making people pay for such a simple thing is meh...

Haha yep, my thoughts precisely!

Yes, the YT app is potentially a knottier problem. I have some swift/iOS experience, so there's a chance I could investigate at some point. There's also a decent chance that getting around that issue may require some kind of customisation of a YT client. But I suppose if there's a way of analysing the output and bundling the functionality into this app (if desirable), it would definitely be a smoother user experience!

kambala-decapitator commented 2 years ago

I have some swift/iOS experience

sounds like you're willing to make a PR for this feature? just kidding =)

if you're interested in the technical bit, the heavy-lifting should be done in a "share extension" (at least that's how I imagine it at the moment).

But I suppose if there's a way of analysing the output and bundling the functionality into this app

I believe it should be possible. Maybe YT shares a plain string or something like that instead of a URL object.

Gaffen commented 2 years ago

sounds like you're willing to make a PR for this feature?

My plate's a bit full right now. But when things free up, and should you still potentially want someone to work on this, I'd be up for giving it a shot!

Gaffen commented 1 year ago

A little update, I have successfully grabbed the url from a webpage using the share extension, but haven't managed to try on a hardware device to make sure that the extension works on both browser and app. I'm also yet to send that link to the kodi remote. But it's progress haha

Gaffen commented 1 year ago

I have also realised that I've written my classes in swift but the project is entirely written in objective c. I'm assuming any pull request would need to be ported over, @kambala-decapitator ? Might be time to get my head around a new syntax.

kambala-decapitator commented 1 year ago

@Gaffen swift is totally fine, unless you want to try objc :)