You can redirect an RTSP or HTTP streaming session (cupertino, sanjose, and smooth) using the Wowza Streaming Engine™ Java API.
Note: Wowza Streaming Engine or Wowza Media Server™ 3.0.0 or later is required.
To redirect an HTTP session the code looks like this:
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) { httpSession.redirectSession("http://192.168.1.22:1935/vod/mp4:sample.mp4/playlist.m3u8"); }
To redirect an RTSPsession the code looks like this:
public void onRTPSessionCreate(RTPSession rtpSession) { rtpSession.redirectSession("rtsp://192.168.1.22:1935/vod/mp4:sample.mp4"); }
The above methods will send a 302 redirect. There are additional APIs to control the response code. See the server-side API documentation for IHTTPStreamerSession and RTPSession.
Note: Not all RTSP and HTTP players support redirects.