webrtc-java
webrtc-java copied to clipboard
VideoTrack is not getting invoked on windows
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());