Im currently creating a custom surveillance application. And i was curious is it possible to take the live stream and and redirect it to a webpage via an ajax request. If so whats an example of how the ajax request would look. I'm working on the video feed aspect with java and was planning on using a servlet to push video feed to a request by the user whos on the appropriate webpage.
解决方案
Only by using ajax + servlet you can not do that, but you need to have a media streaming server to generate the streaming and you can use servlet (and ajax) to redirect it to the custom page.
one good open source media streaming server I can suggest is the Red5 server developed with Java. They have a special module called red5-web which you can simply used for your requirement with a few configurations. It uses RTP/RTMP protocols to do that.
refer
And also you can refer to HTTP streaming also using VLCJ.
A very good example can be found
I hope you can get a help through those links.