What magic is YouTube using to connect to my TV?

So I’ve recently been looking for a new solution to play videos, Netflix etc. on my TV, when I noticed that the YouTube-App on my phone offered an option to stream to TV. I pushed the button and, lo and behold, the video started playing.

Now, my TV doesn’t really have any smart capabilities. However, I’ve recently switched to receiving TV via internet, which is delivered via a box provided by German phone company 1&1; it’s this the app connects to.

So I thought, great, that should mean I can just stream any kind of video to my TV via my phone! Thing is, I haven’t been able to get any other streaming app to connect to the TV, or even detect it as a device. The native screen sharing option on my phone (a cheap Sony XA1 plus) doesn’t work, either.

So, what gives? What does the YouTube-app do that apparently no other can?

It’s using DIAL (Discovery and Launch). See here: Discovery and Launch - Wikipedia
It’s only used by YouTube and Netflix.

I see that the Wikipedia article isn’t very detailed. Basically what happens is the YouTube app on your phone just sends a URL to your TV device. Then the TV device starts streaming the video directly from the internet. It has no communication with your phone after that, except that your phone can trick play the video (pause, stop, etc.) It’s pretty simple to implement on a device that already supports streaming.

Ah, so that’s what it is, thank you! Looks like I’m gonna have to get another means of streaming video after all…

So, then, is mDNS, on the other hand, actual streaming from the mobile device?

No, mDNS is not a streaming protocol. Miracast is the main protocol used on Android phones to mirror the phone screen on another device. Apple their own incompatible protocol called Airplay to do the same thing. Miracast is immensely more complicated than DIAL, so it’s not surprising that there are devices that support DIAL but not Miracast.

Actually, I’m not sure the OP actually attempted to use Miracast. On my Samsung Galaxy S8, it’s called Smart View and it’s accessed from the menu you get when you swipe down from the top of the screen… I’m not sure if it’s has the same name on other Android devices. If your phone has that feature, try that and see if it will connect to your TV.

ETA: this assumes you have an Android phone. If you have an iPhone, there’s no chance that your TV device will support AirPlay, because Apple does not license the technology.

Would this work on my TV which, as far as I know, is not connected to the internet, at least not directly, although the same provider gives us both internet and cable? The cable box includes a hard drive that functions as a DVR.

I don’t know if there are cable boxes that support DIAL. You can test it and see.

BTW I see that the OP did attempt to use screen sharing and it didn’t work. Sorry I missed that, which made post #7 pointless.

Apple started licensing AirPlay 2 to TV manufacturers back in January.

TV via internet? I’ve gone the other way, and do TV by non-networked Raspberry pi/Kodi and a hard drive. Actual stations come in through my digital antenna, A 12X14" plastic like flat thing that receives the digital over air channels, for when I want to watch ads and junk.
I like to keep data leakage from the house to a minimum. Sometimes the cookie managers thing I’m from Bulgaria, and the don’t try to sell me bacterial fermenters, freeze dryers or laser measurement systems anymore. I’ve practically forgotten what a tactical flashlight or a walk in bathtub are.
Life is good when you put a little effort into privacy.

doesn’t youtube have chromecast for streaming?

I’m not sure I’m understanding that question. Chromecast is a hardware product. If the OP had a Chromecast perhaps they could use that to cast their phone screen to their TV, but they didn’t mention that they have one. There are a number of hardware products that can do that, including Roku and I believe FireTV. These are the “other means” that the OP referred to in #4.

And a Chromecast is in fact what I ended up ordering.

oh its just me being dumb … see I have chromecast that was preinstalled installed in my tv and I thought it was just a software program …….
just a warning tho if your watching you tube on a tablet and you hit the little chromecast button (its a tv with waves on the side ) it will change your big screen tv to the yt video no matter what channels its on …… which can be rather jarring when your watching a program and bob the builder pops on and you cant change it until you figure it out (my nephew has done this 3 times at least ) …….