How to run a camera stream in a iframe #1113
Replies: 4 comments 1 reply
-
|
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
|
The Axis camera sets Content-Security-Policy: frame-ancestors 'self', which blocks embedding in an <iframe> from any other origin. To work around this, either use an img html tag for the MJPEG stream or reverse-proxy the camera through a server (ngnix) that strips or modifies the blocking headers. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @RunAutomation , |
Beta Was this translation helpful? Give feedback.
-
|
Feel free to re-open it OR share the solution/alternative/comment if already resolved👁️🗨️ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am new to this. I have a M3088-V camera where I want to run the video stream in an iframe of an https application.
I created this small test in http
The iframe element
<iframe src="http://10.70.205.103/axis-cgi/mjpg/video.cgi?resolution=1920x1080&fps=5" height="1920" width="1080" title="Axis Iframe"> </iframe>when running it I get this error
Refused to frame 'http://10.70.205.103/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
Running http://10.70.205.103/axis-cgi/mjpg/video.cgi?resolution=1920x1080&fps=5 in my browser it works also as https.
Support have replied back to me, that I need to run the stream throe converter, or I will need to create a Custom HTTP header.
Has anyone created a Custom HTTP header for this ?
Beta Was this translation helpful? Give feedback.
All reactions