Video stream loads on local network but not through domain (html displaying webrtc)

Hi

I have a raspberry pi 5 I use as a server at home and a raspberry pi zero 2 w used as an IP camera.

The pi 5 “server” is running bookworm with Apache2 and uses RTSP to Web RTC to convert the RTSP to a format for my web page. The pi zero “camera” is running bullseye and uses mediamtx to stream the camera feed to the server.
The server uses apache2 with php and html and I am viewing the video stream in html inside an iframe.

When I view my webpage on my local network using the URL “server.local” or the servers local IP address, I get the video stream fine and everything works.

When I view the webpage by using the domain, the entire webpage loads fine apart from the video streams. The iframes, video headings and status all load however the stream does not display. I’ve tried this while connected to the same network as the server and also externally.

I have an origin certificate and private key installed on the server and I have tried changing my cloudflare SSL settings to Inactive, Flexible, Full and Strict with no change. The web page is returning valid SSL when these modes are selected. The webrtc and rtsp ports used have been forwarded to the server and also port 443 for https.

I have tried Firefox, chrome, safari and edge web browsers on desktop and chrome and safari on mobile.

Any help is appreciated, I’ve been searching for answers for several days however all I read has come up short.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.