Kakao i Connect Live 커뮤니티

샘플코드 connection 질문입니다

상황 :
full-sample code 기준 두 폰 모두 와이파이만 사용(테스트용)

증상 :

  • 두폰 모두 init 후 con을 누르면 먼저 con을 누른폰만 state: connect가 돼며, 다른 폰은 state:FAIL 상태가 됨.

  • 하단 로그는 나중에 con을 누른 폰의 것이며, init -> connect -> jsonException -> fail 상태로 변합니다.

LOG:
I/AppObserver: State:INIT
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
I/org.webrtc.Logging: SurfaceViewRenderer: remote_video_view: Surface changed: 656x672
I/AppObserver: State:CONNECT
W/System.err: org.json.JSONException: No value for name
W/System.err: at org.json.JSONObject.get(JSONObject.java:389)
W/System.err: at org.json.JSONObject.getString(JSONObject.java:550)
W/System.err: at com.remon.remondroid.data.Channel.getChannel(Channel.java:106)
W/System.err: at com.remon.remondroid.network.WebSocketClientHandler.channelRead0(WebSocketClientHandler.java:112)
W/System.err: at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
W/System.err: at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351)
W/System.err: at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373)
W/System.err: at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359)
W/System.err: at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
W/System.err: at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:536)
W/System.err: at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:490)
W/System.err: at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
W/System.err: at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
W/System.err: at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
W/System.err: at java.lang.Thread.run(Thread.java:818)
I/AppObserver: State:FAIL

질문 : full-sample 코드에서 뭔가 추가 하거나 수정해야 하는 것이 있나요??

서버측의 작업 중 생긴 일시적 오류로 보입니다.
아마도 다시 재현되지 않을 것입니다.
혼선을 드려 죄송합니다.

질문이 있습니다.

영상 연결을 하려면 조작마다 상태 변화가 어떻게 되어야 하는지 …

현재는 init -> conn 버튼을 누르면, 상태가 con상태로 변하진 않고 계속 init상태로만 지속됩니다.
상황은 로컬과 리모트쪽 이 검은 화면으로만 활성화 되고, 카메라와 소리는 먹히지 않습니다.

설정에서 앱 권한을 들어가보면,(안드로이드 버전 6.0.1)
마이크, 저장공간, 전화, 카메라 설정이 있으며, 4가지 모두 활성화 시킨 상태입니다.

아래는 로그 상태입니다.

D/JVM: JVM::environment@[tid=22782]
D/JVM: JNIEnvironment::ctor@[tid=22782]
D/AudioManager: ctor@[tid=22782]
D/JVM: JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioManager)
D/JVM: NativeRegistration::ctor@[tid=22782]
D/JVM: NativeRegistration::NewObject@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioManager: ctor@[name=Thread-16018, id=16018]
I/org.webrtc.Logging: WebRtcAudioManager: Sample rate is set to 48000 Hz
I/org.webrtc.Logging: WebRtcAudioEffects: canUseAcousticEchoCanceler: true
I/org.webrtc.Logging: WebRtcAudioEffects: canUseAutomaticGainControl: true
I/org.webrtc.Logging: WebRtcAudioEffects: canUseNoiseSuppressor: true
I/AudioSystem: audioHookParam = off
I/AudioSystem: audioHookParam = off
I/AudioSystem: audioHookParam = off
D/AudioManager: OnCacheAudioParameters@[tid=22782]
D/AudioManager: hardware_aec: 1
D/AudioManager: hardware_agc: 1
D/AudioManager: hardware_ns: 1
D/AudioManager: low_latency_output: 0
D/AudioManager: pro_audio: 0
D/AudioManager: sample_rate: 48000
D/AudioManager: channels: 1
D/AudioManager: output_buffer_size: 5768
D/AudioManager: input_buffer_size: 1920
D/JVM: GlobalRef::ctor@[tid=22782]
D/AudioManager: JavaAudioManager::ctor@[tid=22782]
D/AudioManager: IsLowLatencyPlayoutSupported()
E/org.webrtc.Logging: WebRtcAudioManager: SM-G925L is blacklisted for OpenSL ES usage!
D/JVM: AttachCurrentThreadIfNeeded::ctor@[tid=22782]
D/JVM: JVM::environment@[tid=22782]
D/JVM: JNIEnvironment::ctor@[tid=22782]
D/AudioTrackJni: ctor@[tid=22782]
D/JVM: JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioTrack)
D/JVM: NativeRegistration::ctor@[tid=22782]
D/JVM: NativeRegistration::NewObject@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioTrack: ctor@[name=Thread-16018, id=16018]
D/JVM: GlobalRef::ctor@[tid=22782]
D/JVM: AttachCurrentThreadIfNeeded::ctor@[tid=22782]
D/JVM: JVM::environment@[tid=22782]
D/JVM: JNIEnvironment::ctor@[tid=22782]
D/AudioRecordJni: ctor@[tid=22782]
D/JVM: JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioRecord)
D/JVM: NativeRegistration::ctor@[tid=22782]
D/JVM: NativeRegistration::NewObject@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioRecord: ctor@[name=Thread-16018, id=16018]
I/org.webrtc.Logging: WebRtcAudioEffects: ctor@[name=Thread-16018, id=16018]
D/JVM: GlobalRef::ctor@[tid=22782]
D/AudioManager: SetActiveAudioLayer(5)@[tid=22782]
D/AudioManager: delay_estimate_in_milliseconds: 150
D/AudioTrackJni: AttachAudioBuffer@[tid=22782]
D/AudioTrackJni: SetPlayoutSampleRate(48000)
D/AudioTrackJni: SetPlayoutChannels(1)
D/AudioRecordJni: AttachAudioBuffer
D/AudioRecordJni: SetRecordingSampleRate(48000)
D/AudioRecordJni: SetRecordingChannels(1)
D/AudioRecordJni: total_delay_in_milliseconds: 150
D/AudioManager: Init@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioManager: init@[name=Thread-16018, id=16018]
I/org.webrtc.Logging: WebRtcAudioManager: audio mode is: MODE_IN_COMMUNICATION
D/AudioTrackJni: Init@[tid=22782]
D/AudioRecordJni: Init@[tid=22782]
D/AudioRecordJni: EnableBuiltInAEC@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioRecord: enableBuiltInAEC(true)
I/org.webrtc.Logging: WebRtcAudioEffects: setAEC(true)
I/org.webrtc.Logging: WebRtcAudioEffects: canUseAcousticEchoCanceler: true
D/AudioRecordJni: EnableBuiltInAGC@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioRecord: enableBuiltInAGC(true)
I/org.webrtc.Logging: WebRtcAudioEffects: setAGC(true)
I/org.webrtc.Logging: WebRtcAudioEffects: canUseAutomaticGainControl: true
D/AudioRecordJni: EnableBuiltInNS@[tid=22782]
I/org.webrtc.Logging: WebRtcAudioRecord: enableBuiltInNS(true)
I/org.webrtc.Logging: WebRtcAudioEffects: setNS(true)
I/org.webrtc.Logging: WebRtcAudioEffects: canUseNoiseSuppressor: true
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/org.webrtc.Logging: PeerConnectionFactory: onNetworkThreadReady
I/org.webrtc.Logging: PeerConnectionFactory: onWorkerThreadReady
I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
I/System.out: WebSocket Client connected!
I/InitServiceHandler: after setWebSocketClient
I/AppObserver: State:INIT
D/ViewRootImpl: ViewPostImeInputStage processPointer 0
D/ViewRootImpl: ViewPostImeInputStage processPointer 1
I/org.webrtc.Logging: SurfaceViewRenderer: remote_video_view: Surface changed: 656x672
I/org.webrtc.Logging: SurfaceViewRenderer: local_video_view: Surface changed: 1049x1075
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)
I/org.webrtc.Logging: WebRtcAudioManager: VOICE_CALL stream volume: 5 (max=5)

메일로 답변드린 바와 같이 같은 이름의 방 이름을 이미 누군가가 사용하고 있기 때문입니다.
발급받은 키를 사용하시거나 다른 방 이름으로 테스트 및 개발을 하시면 됩니다.

감사합니다.