mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.94k stars 598 forks source link

Frame ancestors #692

Closed marcelimati closed 5 months ago

marcelimati commented 5 months ago

Hello, I need a way to open url in iframe hosted by http server of your application. By default it host http server on port 8000, which is fine by me, I tried to run the app with -X parameter which if i understood correctly removed this part: if (!disableXframeOptions) { options.push_back("additional_header"); options.push_back("X-Frame-Options: SAMEORIGIN"); } But in newest browsers you need to pass parameter Content-Security-Policy: frame-ancestors http://192.168.0.192; in header so it will allow to embed the page in iframe from other origin(which is only the same url but on different port), how can i achieve it? I tried to add the line in source but I don't know how to build it on windows because it gives me errors.

marcelimati commented 5 months ago

Nevermind, i managed to run it with using WebRtcStreamer without iframe

mpromonet commented 5 months ago

Hi,

It may be simpler with the webcomponent of this project https://github.com/mpromonet/webrtc-streamer-html/blob/f27dc4ca97aab57ce1f85589983f867a197a70cd/webrtc-streamer-element.js or https://github.com/Eyevinn/webrtc-player

Best Regards, Michel.