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.35k stars 161 forks source link

Crashing iOS app switching stream #724

Open Martinvdm opened 2 days ago

Martinvdm commented 2 days ago

When changing from stream to allow 2 way audio, the IOS companion app is crashing. It takes some seconds but at the end it become unresponsive. The seconds stream is followed by the manual to allow selectable 2 way audio and in the first place without.

Config Lovelace:

- type: 'custom:webrtc-camera'
    server: http://localhost:1984/
    title: camera.voordeur_go2rtc
    streams:
      - url: camera.voordeur
        name: 🔇      # name is optional
        mode: webrtc  # mode is optional
        media: video,audio  # media is optional
      - url: camera.voordeur
        name: 🔊
        mode: webrtc
        media: video,audio,microphone
        muted: false
    ui: true
    muted: true
    background: true

Go2rtc config:

streams:
  camera.voordeur:
    - rtsp://admin:xxxx@172.19.3.3:554/Streaming/channels/102
    - isapi://admin:xxxx@172.19.3.3:65001/

most of the time the first try is working fine. After switching again it hangs by selecting the second stream on black screen ‘loading’ And at the end iOS app become unresponsive and disconnects.

nothing really special in logging. Go2rtc log is clean. Home assistant log only new connection: 2024-07-02 20:50:14.443 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI5NWU1MWE2Yjc2ZGE0MmI0YWM2NDQxYzc5ZjNmMDM4NyIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTcxOTk0NjIxNCwiZXhwIjoxNzE5OTQ2MjQ0fQ.HHYmydw0qOkRTO14MGz5tf6zjpWZ7kwANBRR0ekmdaM', 'url': 'camera.voordeur', 'server': 'http://localhost:1984/'}

companion app logging is also empty. In non ui mode it happens also. Resulting in loading and at the end app disconnect. IMG_2939

backend: Hikvision nvr with isapi camera and 2 way audio. iOS 17.5.1 Companion app 2024.5.1 (2024.688) Home assistant in docker 2024.5.4 Go2rtc 1.9.4

Martinvdm commented 2 days ago

Found out that this is related perhaps https://github.com/home-assistant/iOS/issues/2420