I have a RTMP stream being broadcasted in the same server as my Spring Boot application.
For instance, it can be accessed using
rtmp://localhost/livestream
And it's a video livestream, broadcasted from a RED5 server. I want to redirect this livestream to any amount of clients that try to request it.
For example:
@Service
public class RTMPStreamHandler {
@RequestMapping("/stream") {
public /*Stream Object?*/ getStream() {
//What should be returned?
}
}
This kind of behaviour is necessary so that I can control when that RTMP stream can be accessed, as it will be live 24hrs, but only accessible in some of them. I'll put that logic on my Controller.
How can I setup SpringFramework to read from that RTMP stream and broadcast it to users that try to access that endpoint? Is that a possibility in Spring?