홈>
같은 사용자의 격자보기를 만들기 위해 복합 작업을하려고합니다. 다음 코드를 사용하고 있지만 그리드 대신 단일 출력을 제공합니다.
try {
// 1. Media logic (webRtcEndpoint in loopback)
MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint1 = new WebRtcEndpoint.Builder(pipeline).build();
WebRtcEndpoint webRtcEndpoint2 = new WebRtcEndpoint.Builder(pipeline).build();
WebRtcEndpoint endpointOut = new WebRtcEndpoint.Builder(pipeline).build();
Composite composite = new Composite.Builder(pipeline).build();
HubPort hubPort1 = new HubPort.Builder(composite).build();
HubPort hubPort2 = new HubPort.Builder(composite).build();
HubPort out = new HubPort.Builder(composite).build();
webRtcEndpoint1.connect(hubPort1);
webRtcEndpoint2.connect(hubPort2);
out.connect(endpointOut);
// 2. Store user session
UserSession user = new UserSession();
user.setMediaPipeline(pipeline);
user.setWebRtcEndpoint(endpointOut);
users.put(session.getId(), user);
// 3. SDP negotiation
String sdpOffer = jsonMessage.get("sdpOffer").getAsString();
String sdpAnswer = endpointOut.processOffer(sdpOffer);
JsonObject response = new JsonObject();
response.addProperty("id", "startResponse");
response.addProperty("sdpAnswer", sdpAnswer);
synchronized (session) {
session.sendMessage(new TextMessage(response.toString()));
}
// 4. Gather ICE candidates
endpointOut.addIceCandidateFoundListener(new EventListener<IceCandidateFoundEvent>() {
@Override
public void onEvent(IceCandidateFoundEvent event) {
JsonObject response = new JsonObject();
response.addProperty("id", "iceCandidate");
response.add("candidate", JsonUtils.toJsonObject(event.getCandidate()));
try {
synchronized (session) {
session.sendMessage(new TextMessage(response.toString()));
}
} catch (IOException e) {
log.error(e.getMessage());
}
}
});
endpointOut.gatherCandidates();
} catch (Throwable t) {
sendError(session, t.getMessage());
}
누구든지 도와주세요?
내가 작업하는 프로젝트는 kurento.org 웹 사이트에 제공된 hello world 예제와 동일합니다.
-
답변 # 1
관련 질문
- kurento - ffmpeg에서 rtsp 형식으로의 mp4 비디오
- node.js - Ubuntu 16에서 피어 비디오가 Kurento Media Server에로드되지 않음
- Kurento KMS를 RTSP 멀티 캐스트 URI에 연결할 수 없습니다
- javascript - npm 패키지 'kurento-client'설치 중 오류 (BufferUtil ~ node-gyp rebuild)
- kurento - WebRtc 신호 서버가 추가 STUN 서버없이 클라이언트의 ICE 후보를 찾을 수 있습니까?
- webrtc - kurento-examples-java를 실행할 수 없습니다
- java - 쿠 렌토 합성 그리드 기록
- 공용 서버에서 kurento/openvidu docker를 실행하는 방법
- javascript - kurento 미디어 서버를 사용하여 mp4로 webRTC 스트림 기록
- ~ 30 %의 사례에서 Kurento WebRTC 연결 실패
webRtcEndpoint1.connect (hubPort1)와 연결 한 후; hubport1.connect (webRtcEndpoint1);
도 작성하십시오.이것은 webRtcEndpoint에 이미 컴포지트에 연결된 허브 포트의 미디어를 제공합니다.