The error message indicates that you are trying to access a video stream from a different origin (http://192.168.10.24:8080) using the Real Time Streaming Protocol (rtsp). However, the browser's security policy (CORS) only allows cross-origin requests for specific protocols such as http, https, chrome-extension, etc.

To resolve this issue, you have a few options:

  1. Use a server-side proxy: Set up a server-side script (e.g., PHP, Node.js) on your web server (http://192.168.10.24:8080) that acts as a proxy to the video stream. The script should make the request to the rtsp URL and forward the response to your webpage. As the request is made from the same origin, it will bypass the CORS restrictions.

  2. Use a video player with CORS support: Look for a video player that supports CORS requests for rtsp URLs. This way, the video player will handle the CORS restrictions internally, allowing you to display the video on your webpage.

  3. Convert the video stream: If you have control over the video source, consider converting the video stream to a supported protocol like HTTP Live Streaming (HLS) or Dynamic Adaptive Streaming over HTTP (DASH). These protocols are widely supported and will allow you to access the video stream without CORS issues.

Remember to consider the security implications of allowing cross-origin requests and ensure that the appropriate security measures are in place to protect your video stream

Access to video at rtspadminhbzw20231231921683148554camrealmonitorchannel=1&subtype=0 from origin http19216810248080 has been blocked by CORS policy Cross origin requests are only supported for protoc

原文地址: http://www.cveoy.top/t/topic/iSXV 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录