meshenger-android icon indicating copy to clipboard operation
meshenger-android copied to clipboard

[HELP] How to enable localRenderer, i tried, but not success.

Open liuxue0905 opened this issue 5 years ago • 1 comments

I add setLocalRenderer in RTCCall, setorg.webrtc.SurfaceViewRenderer @+id/localRenderervisibilityvisible

and try:

add blow in RTCCall.handleMediaStream

localRenderer.init(this.sharedContext, null);
upStream.videoTracks.get(0).setEnabled(true);
upStream.videoTracks.get(0).addSink(localRenderer);

or

add blow in RTCCall.createStream

VideoTrack videoTrack = getVideoTrack();
videoTrack.setEnabled(true);
upStream.addTrack(videoTrack);
videoTrack.addSink(localRenderer);

localRenderer did not show any thing.

liuxue0905 avatar Jun 18 '20 09:06 liuxue0905

Sorry, I did not notice this ticket before.

This is the current problem I have myself before I took an break from this project. Let me know if you fixe this (and even better, make a pull request :-) )

mwarning avatar Sep 21 '20 08:09 mwarning

Have a look at the current source code. I remember that the video resources need to be initialized on the GUI thread. While the other code is not allowed on the GUI thread.

mwarning avatar Dec 24 '22 20:12 mwarning