Closed pla1 closed 8 years ago
I'm afraid I can't hook into the list on the screenshot you posted. However, the browser does have "share" action in the toolbar which I could hook into it.
@mzanetti there are also some things we need to look into to get this working properly. What should happen when the app isn't running, or disconnected. Do we ignore it then? (show a message to first start the app and connect to a host), or should you select a host to connect to, after which the command is being send? Or should you maybe always select the host, even when you are connected? (so you can select a different one, when you have multiple available)
well, in Ubuntu the app will be started by the ContentHub if it's not running, so that's not an issue. Not sure how that would work on sailfish... If the app was already running in the background and is connected, I'd just send it to the connected instance, otherwise just queue the command until the app is connected (either by auto-connect or the user explicitly selecting a host)...
I don't think Sailfish has any support for auto launching (and opening a specific page), so I'll probably need to write a DBus interface for it. So I might be able to use DBus activation to automatically start the app whenever it is used.
But I don't think it's actually feasible to implement a "share" plugin for Sailfish at the moment, as (at least in the browser) it's very limited. You're only able to share pages, so the only possibility (without any investigation) would be is checking if it's for example one of the (many) YouTube URLs, and manually parse the id from it. But for example sharing images on web pages isn't possible (yet).
So at least for Sailfish I'm, at the moment, more interested in implementing MPRIS2 and trying to cooperate with authors of other apps, to have a dedicated "send to (Kodi)" button (or something alike), instead of using the official share framework.
Thanks for looking in to this request. As info, if you are using the YouTube web app that Popey published you don't have access to the browser's toolbar share action. I don't know how you would handle several video links being on the page either. Sounds like this will be a tough feature to implement. Thanks again.
For Ubuntu this is implemented in pull request #75
Please integrate the Ubuntu Touch 'Share this video' function with Kodimote for Ubuntu Touch. While on a YouTube page I would like to be able to press the YouTube video Share button and send the video ID to the Kodi media center plugin.video.youtube. There should be two options in the 'Share this video' menu.
Option 1 would play the video immediately regardless of what you have going on and option 2 would add the YouTube video ID to the playlist. You probably don't need it but below are a couple of examples using curl.
Add a video to a play list, start playing the the list, and add another video to the list:
Immediate playback of a video: