/// <summary> /// 发送视频数据 /// </summary> void SendVideo() { //获取SDK捕捉的视频数据 byte[] video = UnityChatSDK.GetVideo(); if (video != null) { UdpSocketManager._instance.Send(EncodeChatDataID(video, RequestByte.REQUEST_VIDEO)); } }
/// <summary> /// 发送视频数据 /// </summary> void SendVideo() { //获取SDK捕捉的视频数据 byte[] video = UnityChatSDK.GetVideo(); if (video != null) { udpPacketIndex++; List <UdpPacket> list = UdpPacketSpliter.Split(udpPacketIndex, video, ChunkLength); for (int i = 0; i < list.Count; i++) { UdpSocketManager._instance.Send(EncodeChatDataID(UdpPacketEncode(list[i]), RequestByte.REQUEST_VIDEO)); } } }