TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.09k stars 3.02k forks source link

Integrate with SmartTube #10791

Open timkgh opened 7 months ago

timkgh commented 7 months ago

Checklist

Feature description

Integrate with SmartTube. Send video from phone NewPipe app to SmartTube running on Android TV. SmartTube can already pair with the official YouTube app, maybe it could also pair with NewPipe.

Why do you want this feature?

Make it easy to flick video from phone to TV

Additional information

https://github.com/yuliskov/SmartTube?tab=readme-ov-file#casting

opusforlife2 commented 7 months ago

Have you tried using KDE Connect or a similar app?

timkgh commented 7 months ago

Have you tried using KDE Connect or a similar app?

Not sure I understand how KDE Connect helps pair SmartTube running on Android TV with NewPipe running on my phone. SmartTube can pair with the stock YouTube app on the phone. I'm proposing there should be a way to pair SmartTube with NewPipe also so that one can cast from NP to ST, I'm not looking for alternate solutions to send URLs between devices.

opusforlife2 commented 7 months ago

Make it easy to flick video from phone to TV

This is what you asked for. I gave a solution for it. Try it and see.

timkgh commented 7 months ago

I think there are also other ways to do it, using something like BubbleUPnP or PlainUPnP, Yatse/Kore, etc.

I'm looking for a direct integration without adding more apps (and issues).

opusforlife2 commented 7 months ago

Yes, but you could be a dear and help test this for all the other people who might want something similar and would be happy with a compromise solution.

kwijybo commented 7 months ago

@opusforlife2 This attitude is very unhelpful and the suggestion is not related to the issue. please stop.

opusforlife2 commented 7 months ago

I don't see what's harmful about helping out the community. But your wish, I guess. ¯\_(ツ)_/¯

iBicha commented 7 months ago

Hi folks, I'm the author of Playlet, and I've recently been exploring "the space" for making casting easier. To kinda sum up things On the phone we have as options

And on TV we have

I was exploring how the DIAL protocol works (Link with Wi-Fi option) and essentially I believe NewPipe does not need to implement a special protocol for it to be able to cast to to all 3 TV apps.

In fact I've been prototyping on to cast from the Official YouTube mobile app (and even from the browser) to Playlet. I have a working "work-in-progress" prototype in Playlet here https://github.com/iBicha/playlet/pull/276, and I have shared my findings and approach in https://github.com/yuliskov/MediaServiceCore/issues/10 because I think the same implementation can work with SmartTube.

So if both SmartTube and Playlet implement the DIAL spec (SmartTube already has the LoungeAPI aka casting) then all NewPipe need to do is to integrate the LoungeAPI to be able to cast to YouTube. Then all the apps listed would be speaking the same protocol and become compatible.

Edit: I believe the ConnectSDK has a DIAL implementation (and many more things) so I guess it can be used find the TVs in the local network

kubo6472 commented 7 months ago

I'd like a guide on the KDE connect thingy. I played with it, but I'm lost how to actually cast anything to my TV. Am I missing something?

opusforlife2 commented 7 months ago

@kubo6472 Are you able to share the video URL from your device to SmartTube on the TV? Does it do anything? Best case scenario it should automatically open SmartTube if it's configured to handle the shared URL intent.

kubo6472 commented 7 months ago

Had to install Firefox (mobile version) on my Android TV, since KDE Connect can't open SmartTube directly. I'd greatly appreciate the proper protocol casting thingy (enter a code from the TV) implementation though. Because keeping three (four) apps open (KDE Connect, Firefox and SmartTube) (+ATV Smart YouTube TV Bridge for some integration or smth) just to watch a single video is a bit too much hacky even for me. Note: I need to keep the apps like open open. On the screen, not in the background. As @iBicha said, we lack proper support between platforms, even though they are "handled" individually and I completely understand, why people were proposing flutter/going cross platform with the rewrite, since it would be amazing, if all the different solutions on different platforms didn't all try to reinvent the wheel...the same way.

opusforlife2 commented 7 months ago

KDE Connect can't open SmartTube directly

Ah, that sucks. Does the SmartTube app open if you click a YT video link in another (non-browser) app, though? It's possible that it hasn't registered the intent handling with the OS.

kubo6472 commented 7 months ago

Tried newpipe too, yeah, it does open, however it only works when kde connect as an app, is open.

I have no idea if the intent is registered with the browser or not, but it goes like: KDE -> Firefox -> Newpipe/SmartTube

opusforlife2 commented 7 months ago

Try removing Firefox. Then the intent might pass from KDE to Newpipe directly. And if that's the case, then someone could open a feature request with SmartTube to register its URL intents.

kubo6472 commented 7 months ago

Without Firefox just nothing happens. I tried having only one app installed at a time.

opusforlife2 commented 7 months ago

What's your OS version?

kubo6472 commented 7 months ago

OS Version: 12 Chromecast 4 HD with Google TV.

opusforlife2 commented 7 months ago

Have you gone into the OS app settings and manually enabled each URL for SmartTube? Does it even have that option?

kubo6472 commented 7 months ago

Nope, but even Newpipe have no options there.

opusforlife2 commented 7 months ago

Oh. TV OS doesn't have this setting? https://9to5google.com/2021/04/21/android-12-verified-links/

kubo6472 commented 7 months ago

Nope it does not, unfortunately, but I caught it on my phone, so I expected it to be there.

opusforlife2 commented 7 months ago

Alright. Nothing for it but going the whole way then. Thanks for testing!

exzombie commented 7 months ago

You can use Open Link With, which is a "browser" whose sole purpose is redirecting URLs to apps. Make it the default browser on the TV, it makes life better.

That said, this won't solve the issue that the kde connect app needs to be open on the TV; I've tried the LocalSend app, and it has the same issue. It's just doesn't seem possible to send an URL to the TV in a generic way that would work while NewPipe is open. Switching apps on the TV is not as easy as on a phone, especially for KDE connect which is not added to the home screen and has to be accessed through settings.

timkgh commented 7 months ago

This is a lot more complicated than it really needs to be. Quality of life would be improved if NewPipe just supported the TV linking protocol.

kubo6472 commented 7 months ago

You can use Open Link With, which is a "browser" whose sole purpose is redirecting URLs to apps. Make it the default browser on the TV, it makes life better.

That said, this won't solve the issue that the kde connect app needs to be open on the TV; I've tried the LocalSend app, and it has the same issue. It's just doesn't seem possible to send an URL to the TV in a generic way that would work while NewPipe is open. Switching apps on the TV is not as easy as on a phone, especially for KDE connect which is not added to the home screen and has to be accessed through settings.

I have a question that I might try later: what if I put Firefox mobile on the TV, login with my account, then use the Open Link With, or Firefox directly to launch NewPipe/SmartTube by sending the tab with the YouTube video?

ilar commented 5 months ago

This is a lot more complicated than it really needs to be. Quality of life would be improved if NewPipe just supported the TV linking protocol.

Yes, can we please drop the side discussions about KDE Connect and other kludges? They really have no place here, this isn't a tech support chat.

Also, adding the 'niche' tag is just petty. The sheer number of tickets, reddit posts, and google search results for casting from newpipe clearly says otherwise.

kubo6472 commented 5 months ago

Yes, can we please drop the side discussions about KDE Connect and other kludges?

Me personally... I just wanted to try what a NewPipe Development/Team Member suggests, and if it works at all.

It was janky and not working most of the time.

They really have no place here, this isn't a tech support chat.

I suppose, that even though I joined the matrix channel, I was still getting answers here. People reading this can now safely dismiss this "(non-)workaround" right away.

My 2 cents is that it was for the better leading the "trying of alternatives" discussion right in this chat 😉.