You can play a local stream and all subscribed remote streams including screen-share, canvas streams within EnxPlayerView Object. Therefore, you need to create an Object of EnxPlayerView Class and then attach the Stream to Player View using EnxStream.attachRenderer() method.

To stop playing a Stream, detach the Stream from PlayerView using EnxStream.detachRenderer().


  • EnxPlayerView – To initiate a Player View object.
  • EnxStream – To attach the Stream to the Player View

Method: To play Stream

- (void)attachRenderer :(EnxPlayerView*)ObjEnxPlayerView;

Parameter: ObjEnxPlayerView – A Player View Object

Method: To stop playing Stream

- (void)detachRenderer;

// To Initialize Local Stream Player View Object 
EnxPlayerView *playerView = [[EnxPlayerView alloc] initLocalView:(CGRect)];

// To Initialize Remote Stream Player View Object 
// EnxPlayerView *playerView  = [[EnxPlayerView alloc] initRemoteView:(CGRect)];
[stream attachRenderer:PlayerView]; // Attach stream to playerview to play
[yourCustomView addSubview:PlayerView]; // Add playerView to your view

[stream detachRenderer]; // Detach Renderer to stop playing