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
To stop playing a Stream, detach the Stream from PlayerView using
EnxPlayerView– To initiate a Player View object.
EnxStream– To attach the Stream to the Player View.
Method: To play Stream
public void attachRenderer( EnxPlayerView playerView)
Parameter: playerView – A Player View Object
Method: To stop playing Stream
public void detachRenderer()– No Parameter required.
EnxPlayerView playerView = new EnxPlayerView( Current-Class-Context, ScalingType, mediaOverlay); stream.attachRenderer(playerView); // Attach stream to playerview to play yourCustomView.addView(playerView); // Add playerView to your view stream.detachRenderer(); // Detach Renderer to stop playing