You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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 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());
The text was updated successfully, but these errors were encountered:
similar problem here, host machine is AVD Windows 11, have following lines that not getting invoked: VideoDeviceSource videoSource = new VideoDeviceSource(); VideoTrack videoTrack = factory.createVideoTrack("videoTrack", videoSource); videoTrack.addSink(new VideoTrackSink() { @Override public void onVideoFrame(VideoFrame frame) { log.info("Video got!"); log.info(frame.timestampNs); } });
log.info("Video track id:"+videoTrack.getId()+" is enabled:"+videoTrack.isEnabled());
to overcome the problem I've built docker with this code, built with .so for linux, docker failed to launch because of Audio device initialization, so I solved it by installing Pulse Audio server on host to emulate linux audio, docker started, connected to video stream but "Video got!" still not invoked, any advice? should I try the same flow on Mac?
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 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 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());
The text was updated successfully, but these errors were encountered: