WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

Posters are displayed on the computer but not in the Companion app

Open d4nm0 opened this issue 1 year ago • 2 comments

Hello,

I've noticed a problem displaying the posters:

On my computer, the posts are displayed correctly. However, in the Companion app, no. it displays a black background

type: custom:stack-in-card
cards:
  - type: custom:mushroom-template-card
    primary: Caméra
    secondary: >
      Cour avant - Batterie: {{
      states('sensor.porte_d_entree_battery_percentage') }}% - Wifi {{
      states('sensor.porte_d_entree_wifi_signal_level') }} 
    icon: mdi:cctv
    icon_color: blue
  - type: custom:layout-card
    layout_type: masonry
    layout:
      max_cols: 1
      height: auto
      padding: 0px
      card_margin: var(--masonry-view-card-margin, 0px 8px 14px)
    cards:
      - type: custom:webrtc-camera
        entity: camera.porte_d_entree
        poster: /local/snapshots/snapshot_CamEnter.jpg
        ui: true
        style: >-
          .screenshot {display: none} .pictureinpicture {display: none}
          .shortcuts { position: absolute; top: 50%; left: 50%; transform:
          translate(-50%, -50%); z-index: 10; background: rgba(0, 0, 0, 0.5);
          border-radius: 50%; padding: 10px; display: flex; align-items: center;
          justify-content: center; } .header {display:none} 
        shortcuts:
          - name: Play
            icon: mdi:play
            service: camera.turn_on
            service_data:
              entity_id: camera.porte_d_entree
          - name: Stop
            icon: mdi:stop
            service: camera.turn_off
            service_data:
              entity_id: camera.porte_d_entree

d4nm0 avatar Nov 30 '24 11:11 d4nm0

I don't know if companion app can work with relative links.

AlexxIT avatar Nov 30 '24 15:11 AlexxIT

@AlexxIT The problem appears to occur only in connection with sections; in the Masonry layout, the stream runs fine.

I have the same problem. On desktop it works without any issues, but in my case on iOS, the stream loads (you can hear the audio), the player (webrtc / hls / mse) shows that the stream is running (controls), but the video stays black.

Works with Poster on Masonry:

ttype: masonry
path: test6
title: test6
cards:
  - type: custom:webrtc-camera
    entity: camera.eingang_stream
    poster: camera.eingang_stream

Dont work with Poster on Sections:

type: sections
max_columns: 4
title: test7
path: test7
sections:
  - type: grid
    cards:
      - type: heading
        heading: New section
      - type: custom:webrtc-camera
        entity: camera.eingang_stream
        poster: camera.eingang_stream

Without Poster the Stream works on Sections

type: sections
max_columns: 4
title: test7
path: test7
sections:
  - type: grid
    cards:
      - type: heading
        heading: New section
      - type: custom:webrtc-camera
        entity: camera.eingang_stream
Core: 2025.4.3
Frontend: 20250411.0
Companion APP: 2025.3
WebRTC Camera: 3.6.0

nima-1102 avatar Apr 21 '25 04:04 nima-1102