android/src/main/java/com/oney/WebRTCModule/WebRTCView.java
/**
     * Starts rendering {@link #videoTrack} if rendering is not in progress and
     * all preconditions for the start of rendering are met.
     */
Starts rendering  #videoTrack if rendering is not in progress and
all preconditions for the start of rendering are met.
Starts rendering #videoTrack if rendering is not in progress and all preconditions for the start of rendering are met .
private void tryAddRendererToVideoTrack() {
        if (videoRenderer == null
                && videoTrack != null
                && ViewCompat.isAttachedToWindow(this)) {
            EglBase.Context sharedContext = EglUtils.getRootEglBaseContext();
            if (sharedContext == null) {
                Log.e(TAG, "Failed to render a VideoTrack!");
                return;
            }
            SurfaceViewRenderer surfaceViewRenderer = getSurfaceViewRenderer();
            surfaceViewRenderer.init(sharedContext, rendererEvents);
            videoRenderer = new VideoRenderer(surfaceViewRenderer);
            videoTrack.addRenderer(videoRenderer);
        }
    }
private void tryAddRendererToVideoTrack ( ) { if ( videoRenderer == null && videoTrack != null && ViewCompat . isAttachedToWindow ( this ) ) { EglBase . Context sharedContext = EglUtils . getRootEglBaseContext ( ) ; if ( sharedContext == null ) { Log . e ( TAG , "Failed to render a VideoTrack!" ) ; return ; } SurfaceViewRenderer surfaceViewRenderer = getSurfaceViewRenderer ( ) ; surfaceViewRenderer . init ( sharedContext , rendererEvents ) ; videoRenderer = new VideoRenderer ( surfaceViewRenderer ) ; videoTrack . addRenderer ( videoRenderer ) ; } }
Starts rendering {@link #videoTrack} if rendering is not in progress and
 all preconditions for the start of rendering are met.
Starts rendering { @link #videoTrack } if rendering is not in progress and all preconditions for the start of rendering are met .
// If SurfaceViewRenderer#init() is invoked, it will throw a // RuntimeException which will very likely kill the application.