web rtc信令流程

之前再做rtc视频通话的时候,参考的demo代码流程阅读

GitHub - ddssingsong/webrtc_server_java: P2P Webrtc VideoConference 视频通话 视频会议

SocketManager.getInstance().connect(Urls.WS, username, 0);

  1. 连接 websocket ws://42.192.40.58:5000/ws/lunlian/0

根据用户名,设备,拼接的地址

  1. 收到服务器发送的登录成功消息

{"eventName":"__login_success","data":{"avatar":"p1.jpeg","userID":"lunlian"}}

启动页收到 登录 成功消息,进入 主界面

  1. 主界面的 UserListFragment 初始化

获取用户列表 http://42.192.40.58:5000/userList,param = null

  1. 视频页面

CallSingleActivity.openActivity(getContext(), userBean.getUserId(), true, userBean.getNickName(), false, false);

gEngineKit = SkyEngineKit.Instance();

SkyEngineKit.init(new VoipEvent());

targetId = intent.getStringExtra(EXTRA_TARGET);

isFromFloatingView = intent.getBooleanExtra(EXTRA_FROM_FLOATING_VIEW, false);

isOutgoing = intent.getBooleanExtra(EXTRA_MO, false);

isAudioOnly = intent.getBooleanExtra(EXTRA_AUDIO_ONLY, false);

如果是打出去

  1. 视频页面 创建会话

room = UUID.randomUUID().toString() + System.currentTimeMillis();

boolean b = gEngineKit.startOutCall(getApplicationContext(), room, targetId, audioOnly);

if (!b) {

finish();

return;

}

App.getInstance().setRoomId(room);

App.getInstance().setOtherUserId(targetId);

CallSession session = gEngineKit.getCurrentSession();

if (session == null) {

finish();

} else {

session.setSessionCallback(this);

}

其中 startOutCall

// 初始化会话

mCurrentCallSession = new CallSession(context, room, audioOnly, mEvent);

mCurrentCallSession.setTargetId(targetId);

mCurrentCallSession.setIsComing(false);

mCurrentCallSession.setCallState(EnumType.CallState.Outgoing);

// 创建房间

mCurrentCallSession.createHome(room, 2);

//CallSession

public CallSession(Context context, String roomId, boolean audioOnly, ISkyEvent event) {

executor = Executors.newSingleThreadExecutor();

this.mIsAudioOnly = audioOnly;

this.mRoomId = roomId;

this.mEvent = event;

iEngine = AVEngine.createEngine(new WebRTCEngine(audioOnly, context));

iEngine.init(this);

}

在 WebRTCEngine中

createConnectionFactory

createLocalStream

mCurrentCallSession.createHome(room, 2);

CallSession

public void createHome(String room, int roomSize) {

executor.execute(() -> {

if (mEvent != null) {

mEvent.createRoom(room, roomSize);

}

});

}

VoipEvent

@Override

public void createRoom(String room, int roomSize) {

SocketManager.getInstance().createRoom(room, roomSize);

}

SocketManager

public void createRoom(String room, int roomSize) {

if (webSocket != null) {

webSocket.createRoom(room, roomSize, myId);

}

}

MyWebSocket

发送,拨打视频电话,发出

public void createRoom(String room, int roomSize, String myId) {

Map map = new HashMap<>();

map.put("eventName", "__create");

Map childMap = new HashMap<>();

childMap.put("room", room);

childMap.put("roomSize", roomSize);

childMap.put("userID", myId);

map.put("data", childMap);

JSONObject object = new JSONObject(map);

final String jsonString = object.toString();

Log.d(TAG, "send-->" + jsonString);

send(jsonString);

}

send-->{"data":{"roomSize":2,"userID":"party","room":"9c2feb88-8f79-400d-aa12-6786a78f13191693378457275"},"eventName":"__create"}

  1. 收到服务器 __peers事件

{"eventName":"__peers","data":{"roomSize":2,"connections":"","you":"party"}}

MyWebSocket

private void handlePeers(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String you = (String) data.get("you"); //自已的名字

String connections = (String) data.get("connections");

int roomSize = (int) data.get("roomSize");

this.iEvent.onPeers(you, connections, roomSize);

}

}

SocketManager

@Override // 加入房间

public void onPeers(String myId, String connections, int roomSize) {

handler.post(() -> {

//自己进入了房间,然后开始发送offer

CallSession currentSession = SkyEngineKit.Instance().getCurrentSession();

if (currentSession != null) {

currentSession.onJoinHome(myId, connections, roomSize);

}

});

}

CallSession

public void onJoinHome(String myId, String users, int roomSize) {

if (!mIsComing) { // 发送邀请

if (roomSize == 2) {

List inviteList = new ArrayList<>();

inviteList.add(mTargetId);

mEvent.sendInvite(mRoomId, inviteList, mIsAudioOnly);

}

}

}

  1. 发送邀请sendInvite

VoipEvent

public void sendInvite(String room, List userIds, boolean audioOnly) {

SocketManager.getInstance().sendInvite(room, userIds, audioOnly);

}

SocketManager

public void sendInvite(String room, List users, boolean audioOnly) {

if (webSocket != null) {

webSocket.sendInvite(room, myId, users, audioOnly);

}

}

MyWebSocket

public void sendInvite(String room, String myId, List users, boolean audioOnly) {

Map map = new HashMap<>();

map.put("eventName", "__invite");

Map childMap = new HashMap<>();

childMap.put("room", room);

childMap.put("audioOnly", audioOnly);

childMap.put("inviteID", myId);

String join = StringUtil.listToString(users);

childMap.put("userList", join);

map.put("data", childMap);

JSONObject object = new JSONObject(map);

final String jsonString = object.toString();

Log.d(TAG, "send-->" + jsonString);

send(jsonString);

}

send-->{"data":{"userList":"likeuuuuuu","inviteID":"party","audioOnly":false,"room":"9c2feb88-8f79-400d-aa12-6786a78f13191693378457275"},"eventName":"__invite"}

  1. 收到服务器发送的对方已响铃

{"data":{"toID":"party","fromID":"likeuuuuuu","room":"9c2feb88-8f79-400d-aa12-6786a78f13191693378457275"},"eventName":"__ring"}

MyWebSocket

private void handleRing(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String fromId = (String) data.get("fromID");

this.iEvent.onRing(fromId);

}

}

SocketManager

public void onRing(String fromId) {

handler.post(() -> {

CallSession currentSession = SkyEngineKit.Instance().getCurrentSession();

if (currentSession != null) {

currentSession.onRingBack(fromId);

}

});

}

CallSession

public void onRingBack(String userId) {

if (mEvent != null) {

mEvent.onRemoteRing();

//mEvent.shouldStartRing(false);

}

}

  1. 对方拒绝

{"data":{"toID":"party","refuseType":"1","fromID":"likeuuuuuu","room":"9c2feb88-8f79-400d-aa12-6786a78f13191693378457275"},"eventName":"__reject"}

MyWebSocket

private void handleReject(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String fromID = (String) data.get("fromID");

int rejectType = Integer.parseInt(String.valueOf(data.get("refuseType")));

this.iEvent.onReject(fromID, rejectType);

}

}

SocketManager

public void onReject(String userId, int type) {

handler.post(() -> {

CallSession currentSession = SkyEngineKit.Instance().getCurrentSession();

if (currentSession != null) {

currentSession.onRefuse(userId, type);

}

});

}

CallSession

public void onRefuse(String userId, int type) {

iEngine.userReject(userId, type);

}

AVEngine

public void userReject(String userId, int type) {

if (iEngine == null) {

return;

}

iEngine.userReject(userId, type);

}

WebRTCEngine

public void userReject(String userId, int type) {

//拒绝接听userId应该是没有添加进peers里去不需要remove

// Peer peer = peers.get(userId);

// if (peer != null) {

// peer.close();

// peers.remove(userId);

// }

// if (peers.size() == 0) {

if (mCallback != null) {

mCallback.reject(type);

}

// }

}

CallSession

public void reject(int type) {

shouldStopRing();

Log.d(TAG, "reject type = " + type);

// handler.post(() -> {

switch (type) {

case 0:

release(EnumType.CallEndReason.Busy);

break;

case 1:

release(EnumType.CallEndReason.RemoteHangup);

break;

}

// });

}

private void release(EnumType.CallEndReason reason) {

executor.execute(() -> {

// 释放内容

iEngine.release();

// 状态设置为Idle

_callState = EnumType.CallState.Idle;

//界面回调

if (sessionCallback != null && sessionCallback.get() != null) {

sessionCallback.get().didCallEndWithReason(reason); //返回到界面更新

} else {

//TODO 结束会话

}

});

}

============

send-->{"data":{"userID":"limiting","room":"9d19a512-0e9f-468c-a352-27303868db6f1695120191439"},"eventName":"__join"}

{"eventName":"__peers","data":{"roomSize":2,"connections":"killKKK","you":"limiting"}}

{"eventName":"__offer","data":{"userID":"limiting","fromID":"killKKK","sdp":"v=0\r\no=- 3101308018889891192 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\....."}}

如果接听的

  1. 接通视频

{"eventName":"__new_peer","data":{"userID":"likeuuuuuu"}}

MyWebSocket

private void handleNewPeer(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String userID = (String) data.get("userID");

this.iEvent.onNewPeer(userID);

}

}

SocketManager

public void onNewPeer(String userId) {

handler.post(() -> {

CallSession currentSession = SkyEngineKit.Instance().getCurrentSession();

if (currentSession != null) {

currentSession.newPeer(userId);

}

});

}

CallSession

// 新成员进入

public void newPeer(String userId) {

handler.post(() -> executor.execute(() -> {

// 其他人加入房间

iEngine.userIn(userId);

// 关闭响铃

if (mEvent != null) {

mEvent.shouldStopRing();

}

// 更换界面

_callState = EnumType.CallState.Connected;

if (sessionCallback != null && sessionCallback.get() != null) {

startTime = System.currentTimeMillis();

sessionCallback.get().didChangeState(_callState);

}

}));

}

AVEngine

public void userIn(String userId) {

if (iEngine == null) {

return;

}

iEngine.userIn(userId);

}

WebRTCEngine

public void userIn(String userId) {

Log.d(TAG, "userIn: " + userId);

// create Peer

Peer peer = new Peer(_factory, iceServers, userId, this);

peer.setOffer(true);

// add localStream

List mediaStreamLabels = Collections.singletonList("ARDAMS");

if (_localVideoTrack != null) {

peer.addVideoTrack(_localVideoTrack, mediaStreamLabels);

}

if (_localAudioTrack != null) {

peer.addAudioTrack(_localAudioTrack, mediaStreamLabels);

}

// 添加列表

peers.put(userId, peer);

// createOffer

peer.createOffer();

}

  1. sdp连接成功

Peer

public void onSetSuccess() {

Log.d(TAG, "sdp连接成功 " + pc.signalingState().toString());

if (pc == null) return;

// 发送者

if (isOffer) {

if (pc.getRemoteDescription() == null) {

Log.d(TAG, "Local SDP set succesfully");

if (!isOffer) {

//接收者,发送Answer

mEvent.onSendAnswer(mUserId, localSdp);

} else {

//发送者,发送自己的offer

mEvent.onSendOffer(mUserId, localSdp);

}

} else {

Log.d(TAG, "Remote SDP set succesfully");

drainCandidates();

}

.....

}

WebRTCEngine

public void onSendOffer(String userId, SessionDescription description) {

if (mCallback != null) {

mCallback.onSendOffer(userId, description);

}

}

CallSession

public void onSendOffer(String userId, SessionDescription description) {

executor.execute(() -> {

if (mEvent != null) {

Log.d(TAG, "onSendOffer");

mEvent.sendOffer(userId, description.description);

}

});

}

VoipEvent

public void sendOffer(String userId, String sdp) {

SocketManager.getInstance().sendOffer(userId, sdp);

}

SocketManager

public void sendOffer(String userId, String sdp) {

if (webSocket != null) {

webSocket.sendOffer(myId, userId, sdp);

}

}

MyWebSocket

public void sendOffer(String myId, String userId, String sdp) {

Map map = new HashMap<>();

Map childMap = new HashMap<>();

childMap.put("sdp", sdp);

childMap.put("userID", userId);

childMap.put("fromID", myId);

map.put("data", childMap);

map.put("eventName", "__offer");

JSONObject object = new JSONObject(map);

final String jsonString = object.toString();

Log.d(TAG, "send-->" + jsonString);

send(jsonString);

}

send-->{

    "data":{

        "userID":"likeuuuuuu",

        "fromID":"party",

    "eventName":"__offer"

}

  1. native onIceCandidate

/** Triggered when a new ICE candidate has been found. */

@CalledByNative("Observer") void onIceCandidate(IceCandidate candidate);

peer

public void onIceCandidate(IceCandidate candidate) {

// 发送IceCandidate

mEvent.onSendIceCandidate(mUserId, candidate);

}

WebRTCEngine

public void onSendIceCandidate(String userId, IceCandidate candidate) {

if (mCallback != null) {

mCallback.onSendIceCandidate(userId, candidate);

}

}

CallSession

public void onSendIceCandidate(String userId, IceCandidate candidate) {

executor.execute(() -> {

if (mEvent != null) {

Log.d(TAG, "onSendIceCandidate");

mEvent.sendIceCandidate(userId, candidate.sdpMid, candidate.sdpMLineIndex, candidate.sdp);

}

});

}

VoipEvent

public void sendIceCandidate(String userId, String id, int label, String candidate) {

SocketManager.getInstance().sendIceCandidate(userId, id, label, candidate);

}

SocketManager

public void sendIceCandidate(String userId, String id, int label, String candidate) {

if (webSocket != null) {

webSocket.sendIceCandidate(myId, userId, id, label, candidate);

}

}

MyWebSocket

public void sendIceCandidate(String myId, String userId, String id, int label, String candidate) {

Map map = new HashMap<>();

map.put("eventName", "__ice_candidate");

Map childMap = new HashMap<>();

childMap.put("userID", userId);

childMap.put("fromID", myId);

childMap.put("id", id);

childMap.put("label", label);

childMap.put("candidate", candidate);

map.put("data", childMap);

JSONObject object = new JSONObject(map);

final String jsonString = object.toString();

Log.d(TAG, "send-->" + jsonString);

if (isOpen()) {

send(jsonString);

}

}

send-->{"data":{"candidate":"candidate:607111646 1 udp 2122260223 10.8.42.48 48619 typ host generation 0 ufrag T6N4 network-id 3 network-cost 10","id":"0","label":0,"userID":"likeuuuuuu","fromID":"party"},"eventName":"__ice_candidate"}

  1. 手动阀手动阀
  2. 收到answer

{

    "data":{

        "fromID":"likeuuuuuu",

        "userID":"party",

       

    "eventName":"__answer"

}

MyWebSocket

----

private void handleAnswer(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String sdp = (String) data.get("sdp");

String userID = (String) data.get("fromID");

this.iEvent.onAnswer(userID, sdp);

}

}

SocketManager

public void onAnswer(String userId, String sdp) {

handler.post(() -> {

CallSession currentSession = SkyEngineKit.Instance().getCurrentSession();

if (currentSession != null) {

currentSession.onReceiverAnswer(userId, sdp);

}

});

}

CallSession

public void onReceiverAnswer(String userId, String sdp) {

executor.execute(() -> {

iEngine.receiveAnswer(userId, sdp);

});

}

AVEngine

public void receiveAnswer(String userId, String sdp) {

if (iEngine == null) {

return;

}

iEngine.receiveAnswer(userId, sdp);

}

WebRTCEngin

public void receiveAnswer(String userId, String sdp) {

Log.d(TAG, "receiveAnswer--" + userId);

Peer peer = peers.get(userId);

if (peer != null) {

SessionDescription sessionDescription = new SessionDescription(SessionDescription.Type.ANSWER, sdp);

peer.setRemoteDescription(sessionDescription);

}

}

PeerConnection

nativeSetRemoteDescription(observer, sdp);

  1. sdfsfsdfds
  2. sdfdsafasdf
  3. sdfsaf

视频数据怎么来的呢

FragmentVideo

pip_video_view

pipRenderer = view.findViewById(R.id.pip_video_view);

private FrameLayout pipRenderer;

private SurfaceViewRenderer localSurfaceView;

private SurfaceViewRenderer remoteSurfaceView;

当 收到remote stream

SKY_CallSession onRemoteStream sessionCallback.get() != null

FragmentVideo

public void didReceiveRemoteVideoTrack(String userId) {

pipRenderer.setVisibility(View.VISIBLE);

if (localSurfaceView != null) {

localSurfaceView.setZOrderMediaOverlay(true);

if (isOutgoing) {

if (localSurfaceView.getParent() != null) {

((ViewGroup) localSurfaceView.getParent()).removeView(localSurfaceView);

}

pipRenderer.addView(localSurfaceView);

}

}

View surfaceView = gEngineKit.getCurrentSession().setupRemoteVideo(userId, false);

Log.d(TAG, "didReceiveRemoteVideoTrack,surfaceView = " + surfaceView);

if (surfaceView != null) {

fullscreenRenderer.setVisibility(View.VISIBLE);

remoteSurfaceView = (SurfaceViewRenderer) surfaceView;

fullscreenRenderer.removeAllViews();

if (remoteSurfaceView.getParent() != null) {

((ViewGroup) remoteSurfaceView.getParent()).removeView(remoteSurfaceView);

}

fullscreenRenderer.addView(remoteSurfaceView);

}

}

WebRTCEngine

public View setupRemoteVideo(String userId, boolean isOverlay) {

if (TextUtils.isEmpty(userId)) {

Log.e(TAG, "setupRemoteVideo userId is null ");

return null;

}

Peer peer = peers.get(userId);

if (peer == null) return null;

if (peer.renderer == null) {

peer.createRender(mRootEglBase, mContext, isOverlay);

}

return peer.renderer;

}

本地的视频数据

例如 onJoinHome的时候

Fragment

public void didCreateLocalVideoTrack() {

if (localSurfaceView == null) {

View surfaceView = gEngineKit.getCurrentSession().setupLocalVideo(true);

if (surfaceView != null) {

localSurfaceView = (SurfaceViewRenderer) surfaceView;

} else {

if (callSingleActivity != null) callSingleActivity.finish();

return;

}

} else {

localSurfaceView.setZOrderMediaOverlay(true);

}

Log.d(TAG,

"didCreateLocalVideoTrack localSurfaceView != null is " + (localSurfaceView != null) + "; remoteSurfaceView == null = " + (remoteSurfaceView == null)

);

if (localSurfaceView.getParent() != null) {

((ViewGroup) localSurfaceView.getParent()).removeView(localSurfaceView);

}

if (isOutgoing && remoteSurfaceView == null) {

if (fullscreenRenderer != null && fullscreenRenderer.getChildCount() != 0)

fullscreenRenderer.removeAllViews();

fullscreenRenderer.addView(localSurfaceView);

} else {

if (pipRenderer.getChildCount() != 0) pipRenderer.removeAllViews();

pipRenderer.addView(localSurfaceView);

}

}

WebRTCEngine

public View setupLocalPreview(boolean isOverlay) {

if (mRootEglBase == null) {

return null;

}

localRenderer = new SurfaceViewRenderer(mContext);

localRenderer.init(mRootEglBase.getEglBaseContext(), null);

localRenderer.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT);

localRenderer.setMirror(true);

localRenderer.setZOrderMediaOverlay(isOverlay);

ProxyVideoSink localSink = new ProxyVideoSink();

localSink.setTarget(localRenderer);

if (_localVideoTrack != null) {

_localVideoTrack.addSink(localSink);

}

return localRenderer;

}

如何挂断

connectedHangupImageView

// 挂断电话

if (id == R.id.incomingHangupImageView || id == R.id.outgoingHangupImageView || id == R.id.connectedHangupImageView) {

if (session != null) {

Log.d(TAG, "endCall");

SkyEngineKit.Instance().endCall();

}

if (callSingleActivity != null) callSingleActivity.finish();

}

SkyEngineKit

// 挂断会话

public void endCall() {

Log.d(TAG, "endCall mCurrentCallSession != null is " + (mCurrentCallSession != null));

if (mCurrentCallSession != null) {

// 停止响铃

mCurrentCallSession.shouldStopRing();

if (mCurrentCallSession.isComing()) {

if (mCurrentCallSession.getState() == EnumType.CallState.Incoming) {

// 接收到邀请,还没同意,发送拒绝

mCurrentCallSession.sendRefuse();

} else {

// 已经接通,挂断电话

mCurrentCallSession.leave();

}

} else {

if (mCurrentCallSession.getState() == EnumType.CallState.Outgoing) {

mCurrentCallSession.sendCancel();

} else {

// 已经接通,挂断电话

mCurrentCallSession.leave();

}

}

mCurrentCallSession.setCallState(EnumType.CallState.Idle);

}

}

CallSession

// 离开房间

public void leave() {

executor.execute(() -> {

if (mEvent != null) {

mEvent.sendLeave(mRoomId, mMyId);

}

});

// 释放变量

release(EnumType.CallEndReason.Hangup);

}

VoipEvent

public void sendLeave(String room, String userId) {

SocketManager.getInstance().sendLeave(room, userId);

}

SocketManager

public void sendLeave(String room, String userId) {

if (webSocket != null) {

webSocket.sendLeave(myId, room, userId);

}

}

MyWebSocket

// 离开房间

public void sendLeave(String myId, String room, String userId) {

Map map = new HashMap<>();

map.put("eventName", "__leave");

Map childMap = new HashMap<>();

childMap.put("room", room);

childMap.put("fromID", myId);

childMap.put("userID", userId);

map.put("data", childMap);

JSONObject object = new JSONObject(map);

final String jsonString = object.toString();

Log.d(TAG, "send-->" + jsonString);

if (isOpen()) {

send(jsonString);

}

}

另外释放资源

CallSession

// 释放资源

private void release(EnumType.CallEndReason reason) {

executor.execute(() -> {

// 释放内容

iEngine.release();

// 状态设置为Idle

_callState = EnumType.CallState.Idle;

//界面回调

if (sessionCallback != null && sessionCallback.get() != null) {

sessionCallback.get().didCallEndWithReason(reason);

} else {

//TODO 结束会话

}

});

}

==================收到邀请

MyWebSocket

private void handleInvite(Map map) {

Map data = (Map) map.get("data");

if (data != null) {

String room = (String) data.get("room");

boolean audioOnly = (boolean) data.get("audioOnly");

String inviteID = (String) data.get("inviteID");

String userList = (String) data.get("userList");

this.iEvent.onInvite(room, audioOnly, inviteID, userList);

}

}

SocketManager

public void onInvite(String room, boolean audioOnly, String inviteId, String userList) {

Intent intent = new Intent();

intent.putExtra("room", room);

intent.putExtra("audioOnly", audioOnly);

intent.putExtra("inviteId", inviteId);

intent.putExtra("userList", userList);

intent.setAction(Consts.ACTION_VOIP_RECEIVER);

intent.setComponent(new ComponentName(App.getInstance().getPackageName(), VoipReceiver.class.getName()));

// 发送广播

App.getInstance().sendBroadcast(intent);

}

VoipReceiver

private void onHasPermission(

Context context, String room, ArrayList list,

String inviteId, Boolean audioOnly, String inviteUserName

) {

//in call 打 进来的

boolean b = SkyEngineKit.Instance().startInCall(App.getInstance(), room, inviteId, audioOnly);

Log.d(TAG, "onHasPermission b = " + b);

if (b) {

App.getInstance().setOtherUserId(inviteId);

Log.d(TAG, "onHasPermission list.size() = " + list.size());

if (list.size() == 1) {

//以视频电话拨打,切换到音频或重走这里,结束掉上一个,防止对方挂断后,下边还有一个通话界面

if (context instanceof CallSingleActivity) {

((CallSingleActivity) context).finish();

}

CallSingleActivity.openActivity(context, inviteId, false, inviteUserName, audioOnly, true);

} else {

// 群聊

}

} else {

Activity activity = ActivityStackManager.getInstance().getTopActivity();

activity.finish(); //销毁掉刚才拉起的

}

}

============

收到邀请

2023-09-20 09:16:15.628 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"userList":"Jehujuju","inviteID":"hhhhhhh","audioOnly":false,"room":"943c4845-6d38-4b53-ae6a-bd38b3915af01695172571888"},"eventName":"__invite"}

2023-09-20 09:16:16.031 3603-4011 SKY_WebSocket com.dds.webrtc.debug D send-->{"eventName":"__ring","data":{"toID":"hhhhhhh","room":"943c4845-6d38-4b53-ae6a-bd38b3915af01695172571888","fromID":"Jehujuju"}}

2023-09-20 09:16:45.602 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"userList":"Jehujuju","inviteID":"hhhhhhh","room":"943c4845-6d38-4b53-ae6a-bd38b3915af01695172571888"},"eventName":"__cancel"}

2023-09-20 09:16:47.531 3603-3603 LeakCanary com.dds.webrtc.debug D Watching instance of android.widget.FrameLayout (com.dds.core.voip.FragmentVideo received Fragment#onDestroyView() callback (references to its views should be cleared to prevent leaks)) with key 9c1cd80e-c0c5-498f-99d3-1e3141087a40

接听

send-->{"eventName":"__join","data":{"userID":"Jehujuju","room":"9a74aec9-e10c-4c61-aae6-c683b6bdfce21695173472840"}}

2023-09-20 09:31:26.691 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"eventName":"__peers","data":{"roomSize":2,"connections":"hhhhhhh","you":"Jehujuju"}}

2023-09-20 09:31:26.734 3603-3603 MediaPlayer com.dds.webrtc.debug W mediaplayer went away with unhandled events

2023-09-20 09:31:27.066 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"userID":"Jehujuju","fromID":"hhhhhhh","sdp":"v=0\r\no=- 。。。Sa0\r\n"},"eventName":"__offer"}

2023-09-20 09:31:27.092 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:982616974 1 udp 2122260223 10.8.42.72 39737 typ host generation 0 ufrag 7k8d network-id 3 network-cost 10","id":"0","label":0,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.132 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:2934845743 1 udp 2122129151 127.0.0.1 42506 typ host generation 0 ufrag 7k8d network-id 1","id":"0","label":0,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.143 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:413690130 1 udp 2122202367 ::1 48860 typ host generation 0 ufrag 7k8d network-id 2","id":"0","label":0,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.158 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:982616974 1 udp 2122260223 10.8.42.72 40482 typ host generation 0 ufrag 7k8d network-id 3 network-cost 10","id":"1","label":1,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.168 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:2934845743 1 udp 2122129151 127.0.0.1 40799 typ host generation 0 ufrag 7k8d network-id 1","id":"1","label":1,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.179 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:413690130 1 udp 2122202367 ::1 48094 typ host generation 0 ufrag 7k8d network-id 2","id":"1","label":1,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.189 3603-3711 SKY_WebSocket com.dds.webrtc.debug D {"data":{"candidate":"candidate:1757133436 1 udp 1686052607 112.48.22.45 40482 typ srflx raddr 10.8.42.72 rport 40482 generation 0 ufrag 7k8d network-id 3 network-cost 10","id":"1","label":1,"userID":"Jehujuju","fromID":"hhhhhhh"},"eventName":"__ice_candidate"}

2023-09-20 09:31:27.195 3603-7450 SKY_WebSocket com.dds.webrtc.debug D send-->{"eventName":"__answer","data":{"userID":"hhhhhhh","fromID":"Jehujuju","sdp":"v=0\r\no=- 6319754889413405358 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS ARDAMS\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 39 40 98 99 104 105 108 109 125\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:6I+6\r\na=ice-pwd:BjC8GgA1xBbc/ks40HCMgKnJ\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 3B:7A:15:F0:CB:8C:BF:36:3C:ED:06:E1:57:1B:87:86:B2:26:DD:1B:C3:01:18:9B:CB:54:72:29:9A:65:C2:02\r\na=setup:active\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 urn:3gpp:video-orientation\r\na=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=sendrecv\r\na=msid:ARDAMS ARDAMSv0\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:39 AV1/90000\r\na=rtcp-fb:39 goog-remb\r\na=rtcp-fb:39 transport-cc\r\na=rtcp-fb:39 ccm fir\r\na=rtcp-fb:39 nack\r\na=rtcp-fb:39 nack pli\r\na=rtpmap:40 rtx/90000\r\na=fmtp:40 apt=39\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:104 H264/90000\r\na=rtcp-fb:104 goog-remb\r\na=rtcp-fb:104 transport-cc\r\na=rtcp-fb:104 ccm fir\r\na=rtcp-fb:104 nack\r\na=rtcp-fb:104 nack pli\r\na=fmtp:104 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:105 rtx/90000\r\na=fmtp:105 apt=104\r\na=rtpmap:108 red/90000\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:125 ulpfec/90000\r\na=ssrc-group:FID 2795870277 2946218380\r\na=ssrc:2795870277 cname:PSGpivX2nebdYOYP\r\na=ssrc:2946218380 cname:PSGpivX2nebdYOYP\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:6I+6\r\na=ice-pwd:BjC8GgA1xBbc/ks40HCMgKnJ\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 3B:7A:15:F0:CB:8C:BF:36:3C:ED:06:E1:57:1B:87:86:B2:26:DD:1B:C3:01:18:9B:CB:54:72:29:9A:65:C2:02\r\na=setup:active\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:ARDAMS ARDAMSa0\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:63 red/48000/2\r\na=fmtp:63 111/111\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:1880590360 cname:PSGpivX2nebdYOYP\r\nz

v=0

o=- 1996303073554818170 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE 0 1

a=extmap-allow-mixed

a=msid-semantic: WMS ARDAMS

m=video 9 UDP/TLS/RTP/SAVPF 96 97 39 40 98 99 104 105 108 109 125

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:Eu/4

a=ice-pwd:e34GImhddmSCmeTxFl8PsSz3

a=ice-options:trickle renomination

a=fingerprint:sha-256 9F:31:1D:C3:83:4C:B4:AC:6C:4A:D5:A1:8E:E1:5D:D0:CB:DC:8A:02:79:99:07:33:48:1F:9E:F1:0A:F9:68:5E

a=setup:actpass

a=mid:0

a=extmap:1 urn:ietf:params:rtp-hdrext:toffset

a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:3 urn:3gpp:video-orientation

a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay

a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type

a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing

a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space

a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid

a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id

a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id

a=sendrecv

a=msid:ARDAMS ARDAMSv0

a=rtcp-mux

a=rtcp-rsize

a=rtpmap:96 VP8/90000

a=rtcp-fb:96 goog-remb

a=rtcp-fb:96 transport-cc

a=rtcp-fb:96 ccm fir

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=rtpmap:97 rtx/90000

a=fmtp:97 apt=96

a=rtpmap:39 AV1/90000

a=rtcp-fb:39 goog-remb

a=rtcp-fb:39 transport-cc

a=rtcp-fb:39 ccm fir

a=rtcp-fb:39 nack

a=rtcp-fb:39 nack pli

a=rtpmap:40 rtx/90000

a=fmtp:40 apt=39

a=rtpmap:98 VP9/90000

a=rtcp-fb:98 goog-remb

a=rtcp-fb:98 transport-cc

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=fmtp:98 profile-id=0

a=rtpmap:99 rtx/90000

a=fmtp:99 apt=98

a=rtpmap:104 H264/90000

a=rtcp-fb:104 goog-remb

a=rtcp-fb:104 transport-cc

a=rtcp-fb:104 ccm fir

a=rtcp-fb:104 nack

a=rtcp-fb:104 nack pli

a=fmtp:104 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

a=rtpmap:105 rtx/90000

a=fmtp:105 apt=104

a=rtpmap:108 red/90000

a=rtpmap:109 rtx/90000

a=fmtp:109 apt=108

a=rtpmap:125 ulpfec/90000

a=ssrc-group:FID 878423326 3927298237

a=ssrc:878423326 cname:wyHEcMiBvGYxylTr

a=ssrc:878423326 msid:ARDAMS ARDAMSv0

a=ssrc:3927298237 cname:wyHEcMiBvGYxylTr

a=ssrc:3927298237 msid:ARDAMS ARDAMSv0

m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 102 0 8 13 110 126

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:Eu/4

a=ice-pwd:e34GImhddmSCmeTxFl8PsSz3

a=ice-options:trickle renomination

a=fingerprint:sha-256 9F:31:1D:C3:83:4C:B4:AC:6C:4A:D5:A1:8E:E1:5D:D0:CB:DC:8A:02:79:99:07:33:48:1F:9E:F1:0A:F9:68:5E

a=setup:actpass

a=mid:1

a=extmap:14 urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time

a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid

a=sendrecv

a=msid:ARDAMS ARDAMSa0

a=rtcp-mux

a=rtpmap:111 opus/48000/2

a=rtcp-fb:111 transport-cc

a=fmtp:111 minptime=10;useinbandfec=1

a=rtpmap:63 red/48000/2

a=fmtp:63 111/111

a=rtpmap:9 G722/8000

a=rtpmap:102 ILBC/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:13 CN/8000

a=rtpmap:110 telephone-event/48000

a=rtpmap:126 telephone-event/8000

a=ssrc:3687042379 cname:wyHEcMiBvGYxylTr

a=ssrc:3687042379 msid:ARDAMS ARDAMSa0

  • 11
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值