When using the
rtp-live and
rtp-live-record stream types, Native RTP and MPEG-TS streams are started and stopped on demand based on client's viewing the stream. The publishing process is started the first time a client attempts to view a stream and stops 60 seconds after the last client has stopped viewing the stream. If you want to control when the stream is started and be sure it remains running you can use the MediaCaster API to acquire and release the stream. The code looks like this:
To start publishing/recording:
Code:
MediaCasterStreamMap mediaCasterMap = appInstance.getMediaCasterStreams();
MediaCasterStreamItem mediaCasterItem = mediaCasterMap.acquire(streamName);
...