/**
* Those modules should be imported for renderer cleaning to work
*/
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.PixelFormat;
import android.graphics.PorterDuff;
...
/**
* Example with streamer and player.
* Demonstrates how to publish a video stream while playing another one.
*/
public class StreamingMinActivity extends AppCompatActivity {
...
if (mPlayButton.getTag() == null || Integer.valueOf(R.string.action_play).equals(mPlayButton.getTag())) {
/**
* The options for the stream to play are set.
* The stream name is passed when StreamOptions object is created.
*/
StreamOptions streamOptions = new StreamOptions(mPlayStreamView.getText().toString());
/**
* Stream is created with method Session.createStream().
*/
playStream = session.createStream(streamOptions);
...
/**
* Method Stream.play() is called to start playback of the stream.
*/
playStream.play();
...
} else {
/**
* Method Stream.stop() is called to stop playback of the stream.
*/
playStream.stop();
playStream = null;
remoteRender.release();
}
...
}