-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
50 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
src/main/java/com/example/VideoChatting/config/SslConfig.java
This file was deleted.
Oops, something went wrong.
96 changes: 48 additions & 48 deletions
96
src/main/java/com/example/VideoChatting/config/WebRtcConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
//package com.example.VideoChatting.config; | ||
// | ||
//import com.example.VideoChatting.service.rtc.KurentoHandler; | ||
//import lombok.RequiredArgsConstructor; | ||
//import org.kurento.client.KurentoClient; | ||
//import org.springframework.context.annotation.Bean; | ||
//import org.springframework.context.annotation.Configuration; | ||
//import org.springframework.web.socket.config.annotation.EnableWebSocket; | ||
//import org.springframework.web.socket.config.annotation.WebSocketConfigurer; | ||
//import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; | ||
//import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; | ||
// | ||
// | ||
//@Configuration | ||
//@EnableWebSocket // 웹 소켓에 대해 자동 설정 | ||
//@RequiredArgsConstructor | ||
//public class WebRtcConfig implements WebSocketConfigurer { | ||
// /* TODO WebRTC 관련 */ | ||
// | ||
// | ||
// @Bean | ||
// public KurentoHandler kurentoHandler(){ | ||
// return new KurentoHandler(); | ||
// } | ||
// @Bean | ||
// public KurentoClient kurentoClient() { | ||
// String kurentoUrl = "ws://52.78.190.79:8888/kurento"; | ||
// return KurentoClient.create(kurentoUrl); | ||
// } | ||
// | ||
// | ||
// // signal 로 요청이 왔을 때 아래의 WebSockerHandler 가 동작하도록 registry 에 설정 | ||
// // 요청은 클라이언트 접속, close, 메시지 발송 등에 대해 특정 메서드를 호출한다 | ||
// @Override | ||
// public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { | ||
// registry.addHandler(kurentoHandler(), "/signal") | ||
// .setAllowedOrigins("*"); | ||
// } | ||
// | ||
// // 웹 소켓에서 rtc 통신을 위한 최대 텍스트 버퍼와 바이너리 버퍼 사이즈를 설정한다 | ||
// @Bean | ||
// public ServletServerContainerFactoryBean createWebSocketContainer() { | ||
// ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean(); | ||
// container.setMaxTextMessageBufferSize(32768); | ||
// container.setMaxBinaryMessageBufferSize(32768); | ||
// return container; | ||
// } | ||
//} | ||
package com.example.VideoChatting.config; | ||
|
||
import com.example.VideoChatting.service.rtc.KurentoHandler; | ||
import lombok.RequiredArgsConstructor; | ||
import org.kurento.client.KurentoClient; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.socket.config.annotation.EnableWebSocket; | ||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer; | ||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry; | ||
import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean; | ||
|
||
|
||
@Configuration | ||
@EnableWebSocket // 웹 소켓에 대해 자동 설정 | ||
@RequiredArgsConstructor | ||
public class WebRtcConfig implements WebSocketConfigurer { | ||
/* TODO WebRTC 관련 */ | ||
|
||
|
||
@Bean | ||
public KurentoHandler kurentoHandler(){ | ||
return new KurentoHandler(); | ||
} | ||
@Bean | ||
public KurentoClient kurentoClient() { | ||
String kurentoUrl = "ws://52.78.190.79:8888/kurento"; | ||
return KurentoClient.create(kurentoUrl); | ||
} | ||
|
||
|
||
// signal 로 요청이 왔을 때 아래의 WebSockerHandler 가 동작하도록 registry 에 설정 | ||
// 요청은 클라이언트 접속, close, 메시지 발송 등에 대해 특정 메서드를 호출한다 | ||
@Override | ||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { | ||
registry.addHandler(kurentoHandler(), "/signal") | ||
.setAllowedOrigins("*"); | ||
} | ||
|
||
// 웹 소켓에서 rtc 통신을 위한 최대 텍스트 버퍼와 바이너리 버퍼 사이즈를 설정한다 | ||
@Bean | ||
public ServletServerContainerFactoryBean createWebSocketContainer() { | ||
ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean(); | ||
container.setMaxTextMessageBufferSize(32768); | ||
container.setMaxBinaryMessageBufferSize(32768); | ||
return container; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters