webrtc-java icon indicating copy to clipboard operation
webrtc-java copied to clipboard

VideoTrack is not getting invoked on windows

Open SFX123456 opened this issue 8 months ago • 0 comments

Hello Underneath is the code that should work in my opinion. It works with audio and datachannels, but video is not working. I have 1 camera and the camera gets registered fine and also the track. List<VideoDevice> captureDevices = MediaDevices.getVideoCaptureDevices(); System.out.println("amojuntof capture devices " + captureDevices.size()); VideoDeviceSource videoDeviceSource = new VideoDeviceSource(); videoDeviceSource.setVideoCaptureDevice(captureDevices.get(0)); System.out.println("created video device source "); VideoTrack videoTrack = peerConnectionFactory.createVideoTrack("video",(VideoTrackSource) videoDeviceSource); ArrayList<String> g = new ArrayList<>(); g.add("video"); System.out.println("video set up 1"); videoTrack.addSink(new VideoTrackSink() { @Override public void onVideoFrame(VideoFrame videoFrame) { System.out.println("video frame "); } }); videoTrack.setEnabled(true); System.out.println("is enabled video" + videoTrack.isEnabled());

SFX123456 avatar Jun 05 '24 07:06 SFX123456