Skip to content

Conversation

appetterson
Copy link

@appetterson appetterson commented Oct 8, 2025

Added an option for an icon for different streams.

I have multiple streams to allow for toggleable two way audio. Previously I used emojis to represent when the mic was active or not, but this didn't fit well with the rest of the UI. The ideal would be to use a home-assistant icon.

The solution I propose is to add an icon next to the stream name. This can then be hidden if required by the style options. Similarly the name can be hidden leaving just the icon. By default, when no icon is specified, we default to the camera icon.

With no icon specified this looks like this:
image

With this config:

 - type: custom:webrtc-camera
  streams:
    - entity: camera.nursery_camera
      media: video,audio
      icon: mdi:microphone-off
      name: Muted
    - entity: camera.nursery_camera
      media: video,audio,microphone
      icon: mdi:microphone
      name: Active
  ui: true

We get this result:
image
and when you click on the stream:
image

Components can still be styled from the "stream" class (which is now a div).
Individual components can be hidden with "streamicon" or "streamname"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant