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.
Class: EnxRoom
Methods:
-(void)startStreaming:(NSDictionary *_Nonnull)streamingConfig;
-(void)stopStreaming:(NSDictionary *_Nonnull)streamingConfig;
Parameters:
streamingConfig
– Configuration options for forwarding streamsrtmpDetails.rtmpUrl
– Use “RTM-URL/RTMP-KEY” from CDN ProviderrtmpDetails.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
Code | Description |
---|---|
5121 | Repeated startStreaming() call while the previous request is in process. |
5122 | Repeated startStreaming() call after Streaming has started. |
5123 | Repeated stopStreaming() call while the previous request is in process. |
5124 | stopStreaming() called without starting a Stream first. Non-Contextual Method Call. |
5125 | Invalid Stream configuration. |