AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.42k stars 168 forks source link

Video stream not resized on Android #553

Open rik1984 opened 1 year ago

rik1984 commented 1 year ago

The video stream is not resized into the frame on the Android HA Dashboard. It worked fine and I supposed it was going wrong since the last update. Probably related to this change: https://github.com/AlexxIT/WebRTC/issues/21 ? Screenshot_20230823_115807_Home Assistant

The strange part is is that it works fine on Windows Chrome: Schermafbeelding 2023-08-23 115759

I've tried to experiment with the style parameters, like this: style: "video {object-fit: cover; object-position: left top;}" I tried scale-down, cover, contain, fill but all without the desired effect

The code I use in the dashboard is:

  - icon: mdi:cctv
    type: custom:vertical-layout
    theme: noctis
    layout:
      max_cols: 1
    cards:          
      - type: custom:webrtc-camera
        url: rtsp://xxxx@xxxx:88/videoMain
      - type: custom:webrtc-camera
        url: rtsp://xxxxx@xxxx:554/videoMain
exee25 commented 1 month ago

try to add in your lovelace

 digital_ptz: false

if you haven't add this code, you can double click the screen to zoom in (digital zoom), and you also can double click to change 1x original zoom on your android phone