How do Google products detect the presence of a smart TV or allow YouTube casting?

1

I have a smart TV with YouTube app. I seen that the existence of the smart TV is detected by my phone’s YouTube application as well as Chrome/Chromium browsers on phone as well as on desktop. This allows me to cast video on TV directly.

FireFox does not seem able to detect smart TV or at least not showing me the cast button while visiting YouTube.

General theory is there must be something in air (or at least on the network) that TV is broadcasting and Google products are detecting it.

With browser based YouTube and assumption that it’s same/similar HTML/JavaScript code, how does Chrome/Chromium show the cast button, but not FireFox. There must be something in the API that allows cast on TV button to be enabled?

user871199

Posted 2019-12-01T18:02:11.427

Reputation: 206

Question was closed 2019-12-03T19:50:13.293

Answers

2

These web applications usually broadcast a packet (addressed to MAC address FF:FF:FF:FF:FF:FF1, so every device accepts it - this is known as a broadcast address) which asks if they are a Smart TV/display/Chromecast etc. Those device then reply with a “Yes, I am…” packet and your web application receives this and gives you the option to cast.

Chrome may have this on their browser (such that YouTube can send the broadcast packet) but whether it is only allowed on Chrome, or if only Chrome is designed to let the web application broadcast to the local network, I dont know, sorry. Perhaps there will be future support for Firefox to do the same.

To be honest, I hate this feature - it’s way too easy to accidentally cast on the network, especially on Android’s YouTube app. So I haven’t looked much into how it works, only into how I can disable it.


1It may be IP address 255.255.255.255, which is another way of broadcasting — the implementation may differ but the gist is the same.

QuickishFM

Posted 2019-12-01T18:02:11.427

Reputation: 626

2

These devices — and applications — use Google’s proprietary protocol called Google Cast:

Google Cast, branded for consumer devices as Chromecast built-in, is a proprietary protocol developed by Google that enables mobile devices and personal computers to initiate and control playback of Internet-streamed audio/video content on a compatible device, such as a digital media player connected to a high-definition television or home audio system. The protocol was first launched on July 24, 2013, to support Google's first-generation Chromecast player.

JakeGould

Posted 2019-12-01T18:02:11.427

Reputation: 38 217