question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add native cast support

See original GitHub issue

A cast button to leverage the recently introduced Home Assistant Play Media action to show a camera stream in a Chromecast enabled media player.

When clicked, it would open a dropdown menu allowing to select which media player to cast the current camera stream to.

When selected, the card can then trigger the Play Media action passing in the current camera entity as input, in the selected media player.

It would be disabled for birdseye, by the way.

I haven’t tried to build my own custom buttons yet (and I wonder how far it would be possible), but the following are the reasons why I’m opening this suggestion:

  1. I believe it’s a quite common and generic use case. It would be nice to support it out-of-the-box, as HA now also does.
  2. I don’t think the current tap_action syntax provides the means to call a Play Media action (which is not a service, by the way). But I suppose the card can do it, though.
  3. If provided by the card, it can automatically decide to hide the button in case no suitable media players are found.
  4. If provided by the card, I suppose it can also color the icon based on the media_player state (whether it has started to stream the given camera or not), although this can come as an enhancement later (if possible at all).

What do you think?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dermotduffycommented, Mar 5, 2022

Hi @felipecrs , sounds like a good suggestion.

When selected, the card can then trigger the Play Media action passing in the current camera entity as input, in the selected media player.

I think it hinges on this: whether or not / how a custom card can actually do this . It has to be via HA in order to get the HA media devices, which means it depends on HA having externalized that support somehow. The HA frontend is an enormous Javascript blob, and it is tricky – and in some cases not possible – for custom cards to get access to parts of it (here’s an example of where the card needs to fake load a picture glance card to get access to the editor widgets).

i.e. more research required on whether this is feasible right now.

0reactions
dermotduffycommented, May 3, 2022

Will be in v4.0.0 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable native Cast Support in Google Chrome
Open your Google Chrome browser, right-click an empty area on the page you want to cast on your TV screen, and select the...
Read more >
How to enable native Chromecast support in Chrome - CNET
Step 3: Start casting by using the Cast option in the right-click menu. If you have the Google Cast extension installed, it will...
Read more >
Cast plugin for the Native SDK for Android
In this topic, you will learn how to cast your videos to a Chromecast-connected TV, using the Cast plugin for the Brightcove Native...
Read more >
Integrate Cast Into Your Android App - Google Developers
This developer guide describes how to add Google Cast support to your Android sender app using the Android Sender SDK. Note: We recommend...
Read more >
Installation - React Native Google Cast
In XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] · Go to node_modules ➜ react-native-google-cast ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found