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.5k stars 177 forks source link

iOS cant view livestream #139

Closed dpomnean closed 2 years ago

dpomnean commented 3 years ago

Not able to view livestream through iOS, it stops at the 'starting connection (WebRTC)' phase and never loads. I also get this error when following the logs.

2021-10-11 14:30:09 ERROR (MainThread) [frontend.js.latest.202106030] homeurl.home.com/webrtc/webrtc-camera.js:675:22 NotSupportedError: Cannot define multiple custom elements with the same tag name

This only happens on iOS through the mobile app and via browser. I do not have this issue on Android or web browser through a laptop.

atv2016 commented 3 years ago

I can confirm, I see the same here. I enabled all the experimental webrtc features in safari as well.

AlexxIT commented 3 years ago

What version iOS? You using browser or Hass app?

dpomnean commented 3 years ago

@AlexxIT iOS 14.8 and this occurs in the browser, chrome, and in the app.

lixinrishi commented 3 years ago

me too , ios 15.0 app and safari, edge,

Stooovie commented 3 years ago

Just reporting that I have no issue viewing the stream on iOS 15.0.2, from Wifi and LTE. Mine just displays the default Unix date of 1970-01-01 as watermark ;)

EDIT: for posterity - the 1970 date was some kind of fluke, it's correct now

dpomnean commented 3 years ago

@Stooovie could you share your card yaml? I am curious why yours works. I updating my phone to 15.0.2 and still have the same issue

Stooovie commented 3 years ago

I have seriously just the basic setup:

type: custom:webrtc-camera
url: rtsp://rtsp:12345678@192.168.0.xxx:554/av_stream/ch0
background: true

Background isn't even necessary. I connect via Nabu Casa and I have VPN (Wireguard) when connecting from WAN but the camera feed just works both with and without it enabled.

Maybe it's the ISP setup. My ISP gives me just an ethernet cable, no modem, router is mine. I didn't even have to open any ports and 443 is not explicitly open.

It's really great and it's better than the official app that doesn't allow zooming (not camera zoom but enlarging the image). Even the PiP mode on iPad (and desktop) works!

dpomnean commented 3 years ago

Thanks @Stooovie, I tried the stream from vlc player and the stream is fine, I'm noticing its only while using webrtc.

Stooovie commented 3 years ago

i am using webrtc according to the watermark logo

blvermeu commented 2 years ago

Same issue here, iphone 12, with latest IOS (15) and fully up to date. 'starting connection (WebRTC)' icon keeps on the screen, both on chrome (ios) and the native HA app.

thanks!

fouram commented 2 years ago

Confirmed here on iOS 15.1 and iPhone 13 Pro. Both wifi and cellular. Was having this issue as well on an older device before upgrading (iOS 12, iPhone 6)

my camera is a single Amcrest I2MP-841EW and it’s connected via ONVIF, which is what is used in the custom element config

I wanted to update that somehow it started working again after I had updated HomeAssistant and had to reload the interface in the apps, but after a few days it stopped again

shablagu commented 2 years ago

having the same issue on my ios devices on LAN and WAN, using either the home assistant app or safari. No issue on laptop or android devices. Running home assistant core in a docker.

dpomnean commented 2 years ago

Upgraded home assistant to 2021.11.5. Still same issue

dpomnean commented 2 years ago

My issue was the VPN that was enabled on my iphone (it's a work phone). Once I disabled that, it started working. Not sure if it was a combination of my Hass update or a combination of the two.

I will close this.