The EnxRoom.startStreaming() method allows the Moderator to forward live Video Sessions over RTMP Stream to any live streaming CDNs supporting this protocol. The EnxRoom.stopStreaming() method is used to stop forwarding RTMP Stream.

ClassEnxRoom

Methods:

  • -(void)startStreaming:(NSDictionary *_Nonnull)streamingConfig;
  • -(void)stopStreaming:(NSDictionary *_Nonnull)streamingConfig; 

Parameters:

  • streamingConfig – Configuration options for forwarding streams
    • rtmpDetails.rtmpUrl – Use “RTM-URL/RTMP-KEY” from CDN Provider
    • rtmpDetails.urlDetails.url – Optional RTMP Streaming View URL. If not given, a default Streaming View will be applied.

Delegate Methods:

  • - room:didAckStartStreaming: – Acknowledgment to the Moderator when RTMP Streaming starts.
  • - room:didAckStopStreaming: – Acknowledgment to the Moderator when RTMP Streaming starts.
  • - room:didStreamingNotification: – Notification to all the Participants in the Room when RTMP Streaming starts/stops.
//Start Live Streaming
 
-(void)startStreaming:(NSDictionary *_Nonnull)streamingConfig;
 
NSDictionary *StemInfo = @{@"rtmpDetails": :@{@"rtmpUrl":@"rtmp://a.rtmp.youtube.com/live2/4rjb-hprf-7wf5-9923"}, :@"urlDetails":@{@"url":@"https://meeting-qa.enablex.io/room/?token="}}
 
[EnxRoom startStreaming: StemInfo];

// Stop Live Streaming
 
-(void)stopStreaming:(NSDictionary *_Nonnull)streamingConfig;
 
NSDictionary *StemInfo = @{@"rtmpDetails": :@{@"rtmpUrl":@"rtmp://a.rtmp.youtube.com/live2/4rjb-hprf-7wf5-9923"}, :@"urlDetails":@{@"url":@"https://meeting-qa.enablex.io/room/?token="}}
 
[EnxRoom stopStreaming: StemInfo];

Error Codes / Exceptions

CodeDescription
5121Repeated startStreaming() call while the previous request is in process.
5122Repeated startStreaming() call after Streaming has started.
5123Repeated stopStreaming() call while the previous request is in process.
5124stopStreaming() called without starting a Stream first. Non-Contextual Method Call.
5125Invalid Stream configuration.