Search in sources :

Example 1 with AudioTrack

use of org.webrtc.AudioTrack in project Signal-Android by WhisperSystems.

the class WebRtcCallService method onAddStream.

@Override
public void onAddStream(MediaStream stream) {
    Log.w(TAG, "onAddStream:" + stream);
    for (AudioTrack audioTrack : stream.audioTracks) {
        audioTrack.setEnabled(true);
    }
    if (stream.videoTracks != null && stream.videoTracks.size() == 1) {
        VideoTrack videoTrack = stream.videoTracks.getFirst();
        videoTrack.setEnabled(true);
        videoTrack.addRenderer(new VideoRenderer(remoteRenderer));
    }
}
Also used : VideoRenderer(org.webrtc.VideoRenderer) VideoTrack(org.webrtc.VideoTrack) AudioTrack(org.webrtc.AudioTrack)

Aggregations

AudioTrack (org.webrtc.AudioTrack)1 VideoRenderer (org.webrtc.VideoRenderer)1 VideoTrack (org.webrtc.VideoTrack)1