xushiting 3 年 前
コミット
fd8807808b
1 ファイル変更383 行追加0 行削除
  1. 383 0
      src/接口数据.txt

+ 383 - 0
src/接口数据.txt

@@ -146,4 +146,387 @@
     }
 
 备注:服务器发送的数据共用一个模板
+/*************************************************************************************************************************/
+
+/*****************************************************发送webrtc**********************************************************/
+1.心跳数据(定时发送):
+{
+	"action_type":1009,
+	"echo_msg":
+	{
+		"echoMsg":"1650886368719"
+	},
+	"trace_id":"1965cfdd-8d1c-4066-b0c2-48f85c6ba0aa",
+	"user_id":"0a3987974feb4"
+}
+2.心跳数据(定时发送):
+{
+	"action_type":1024,
+	"getNewUserStateAction":
+	{
+		"userType":0
+	},
+	"trace_id":"4b363802-7b7a-40e6-9bf0-fa45d0db3d87",
+	"user_id":"0a3987974feb4"
+}
+3.获得呼吸点:
+{
+	"action_type":1004,
+	"get_neighbor_points_action":
+	{
+		"point":{
+			"x":-755,
+			"y":-1450,
+			"z":-34
+		},
+		"level":1,
+		"containSelf":true,
+		"searchRange":1000
+	},
+	"trace_id":"7a64ddd9-a13a-4e1e-ba36-ab287f2ce093",
+	"user_id":"72ad7d2086ddc"
+}
+4. 旋转:
+{
+	"action_type":1014,
+	"rotation_action":
+	{
+		"vertical_move":0,
+		"horizontal_move":-0.020630372492836675
+	},
+	"trace_id":"b40a894e-cd59-4db5-8d75-a8466a0c9f15",
+	"user_id":"0a3987974feb4"
+}
+5. 过渡:
+{
+	"action_type":1,
+	"clicking_action":
+	{
+		"clicking_point":{"x":-457.393553659546,"y":-1426.709199915767,"z":7.961884072222136},
+		"clicking_type":3,
+		"extra":"",
+		"attitude":"walk"
+	},
+	"clicking_state":
+	{
+		"roomTypeId":"",
+		"person":0,
+		"avatarId":"",
+		"skinId":"",
+		"roomId":"",
+		"isHost":false,
+		"isFollowHost":false,
+		"skinDataVersion":"",
+		"avatarComponents":"",
+		"nickName":"",
+		"movingMode":0,
+		"attitude":"",
+		"areaName":"",
+		"pathName":"",
+		"pathId":"",
+		"avatarSize":1,
+		"extra":"",
+		"prioritySync":false,
+		"player":
+		{
+			"position":{"x":-755,"y":-1450,"z":-34},
+			"angle":
+			{	
+				"pitch":0,"yaw":0,"roll":0
+			}
+		},
+		"camera":
+		{
+			"position":{"x":-823.0566,"y":-1577.325,"z":86},
+			"angle":{"pitch":0,"yaw":61.875,"roll":0}
+		},
+		"cameraCenter":{"x":-755,"y":-1450,"z":-34}
+	},
+	"trace_id":"739604dd-b34d-4deb-81a2-e80c3df6bdfe",
+	"user_id":"976d17b5650a5"
+}
+
+
+备注:心跳数据定时发送的时候,两次1,一次2
+/*************************************************************************************************************************/
+
+/*****************************************************接收webrtc**********************************************************/
+备注:都是二进制数据,在函数dataHandle的参数上
+
+1. 心跳数据
+2. 视频流
+3. 全景图片
+4.定时
+{
+	"actionType":1009,
+	"pointType":100,
+	"extra":"",
+	"traceId":"68a36026-74b3-4435-a6df-8aba5661cbaa",
+	"packetId":"",
+	"nps":[],
+	"peopleNum":0,
+	"zoneId":"",
+	"echoMsg":"1650888984547",
+	"reserveDetail":null,
+	"userWithAvatarList":[],
+	"newUserStates":[],
+	"code":0,
+	"msg":""
+}
+5.定时
+{
+	"actionType":1024,
+	"pointType":100,
+	"extra":"",
+	"traceId":"f302b7fe-6231-4ba1-b865-8daf3ebd9494",
+	"packetId":"",
+	"nps":[],
+	"peopleNum":0,
+	"zoneId":"",
+	"echoMsg":"",
+	"reserveDetail":null,
+	"userWithAvatarList":[],
+	"newUserStates":
+	[
+		{
+			"userId":"72b61ff6370ca",
+			"playerState":{
+				"roomTypeId":"",
+				"person":0,
+				"avatarId":"KGe_Boy",
+				"skinId":"10089",
+				"roomId":"e629ef3e-022d-4e64-8654-703bb96410eb",
+				"isHost":false,
+				"isFollowHost":false,
+				"skinDataVersion":"1008900008",
+				"avatarComponents":"",
+				"nickName":"72b61ff6370ca",
+				"movingMode":0,
+				"attitude":"walk",
+				"areaName":"",
+				"pathName":"",
+				"pathId":"",
+				"avatarSize":1,
+				"extra":"{"removeWhenDisconnected":true}",
+				"prioritySync":false,
+				"player":{
+					"position":{"x":-755,"y":-1450,"z":-34},
+					"angle":{"pitch":0,"yaw":0,"roll":0}
+				},
+				"camera":null,
+				"cameraCenter":null
+			},
+			"renderInfo":
+			{
+				"renderType":0,
+				"videoFrame":null,
+				"cameraStateType":0,
+				"isMoving":0,
+				"needIfr":0,
+				"isVideo":0,
+				"stillFrame":0,
+				"isRotating":0,
+				"isFollowing":0,
+				"clientPanoTitlesBitmap":[],
+				"clientPanoTreceId":"",
+				"prefetchVideoId":"",
+				"noMedia":false
+			},
+			"event":
+			{
+			"id":"",
+			"type":0,
+			"points":[],
+			"rotateEvent":null,
+			"removeVisitorEvent":null
+			},
+			"relation":0
+		},
+		{
+			"userId":"4c4e24740f427",
+			"playerState":
+			{
+				"roomTypeId":"",
+				"person":0,
+				"avatarId":"KGe_Boy",
+				"skinId":"10089",
+				"roomId":"e629ef3e-022d-4e64-8654-703bb96410eb",
+				"isHost":false,
+				"isFollowHost":false,
+				"skinDataVersion":"1008900008",
+				"avatarComponents":"",
+				"nickName":"4c4e24740f427",
+				"movingMode":0,
+				"attitude":"walk",
+				"areaName":"",
+				"pathName":"",
+				"pathId":"",
+				"avatarSize":1,
+				"extra":
+				{
+					"removeWhenDisconnected":true
+				},
+				"prioritySync":false,
+				"player":
+				{
+					"position":{"x":-755,"y":-1450,"z":-34},
+					"angle":{"pitch":0,"yaw":0,"roll":0}
+				},
+				"camera":null,
+				"cameraCenter":null
+			},
+			"renderInfo":
+			{
+				"renderType":0,
+				"videoFrame":null,
+				"cameraStateType":0,
+				"isMoving":0,
+				"needIfr":0,
+				"isVideo":0,
+				"stillFrame":0,
+				"isRotating":0,
+				"isFollowing":0,
+				"clientPanoTitlesBitmap":[],
+				"clientPanoTreceId":"",
+				"prefetchVideoId":"",
+				"noMedia":false
+			},
+			"event":
+			{
+				"id":"",
+				"type":0,
+				"points":[],
+				"rotateEvent":null,
+				"removeVisitorEvent":null
+			},
+			"relation":0
+		}
+	],
+	"code":0,
+	"msg":""
+}
+6. 旋转:
+{
+	"actionType":1014,
+	"pointType":100,
+	"extra":"",
+	"traceId":"b12a3b92-1e49-4764-851d-32f0466286bf",
+	"packetId":"",
+	"nps":[],
+	"peopleNum":0,
+	"zoneId":"",
+	"echoMsg":"",
+	"reserveDetail":null,
+	"userWithAvatarList":[],
+	"newUserStates":[],
+	"code":0,
+	"msg":""
+}
+7. 获取呼吸点
+{
+	"actionType":1004,
+	"pointType":100,
+	"extra":"",
+	"traceId":"5048e701-ebdb-473a-b688-6846c2f6ccdf",
+	"packetId":"",
+	"nps":[
+		{"x":235,"y":-1583.75,"z":3.5},
+		{"x":235,"y":-1550,"z":4.108108},
+		{"x":235,"y":-1514.375,"z":4.75},
+		{"x":235,"y":-1499.9999,"z":5.0090113},
+		{"x":235,"y":-1445,"z":6},
+		{"x":200,"y":-1700,"z":2.036036},
+		{"x":200,"y":-1650,"z":2.9369369},
+		{"x":200,"y":-1600,"z":3.837838},
+		{"x":200,"y":-1550,"z":4.738739},
+		{"x":200,"y":-1500,"z":5.63964},
+		{"x":200,"y":-1444.2554,"z":6},
+		{"x":176.25,"y":-1443.75,"z":6},
+		{"x":150,"y":-1865.7142,"z":-1.1428561},
+		{"x":150,"y":-1850.0001,"z":-0.8085134},
+		{"x":150,"y":-1798.5714,"z":0.28571463},
+		{"x":150,"y":-1750,"z":1.319149},
+		{"x":150,"y":-1731.4286,"z":1.7142854},
+		{"x":150,"y":-1700,"z":2.382979},
+		{"x":150,"y":-1664.2856,"z":3.142859},
+		{"x":150,"y":-1650.0001,"z":3.446806},
+		{"x":150,"y":-1597.1428,"z":4.5714293},
+		{"x":150,"y":-1550,"z":5.5744677},
+		{"x":150,"y":-1443.1917,"z":6},
+		{"x":150,"y":-1500,"z":6},
+		{"x":150,"y":-1530,"z":6},
+		{"x":117.5,"y":-1442.5,"z":6},
+		{"x":115,"y":-1495,"z":6},
+		{"x":100,"y":-1442.1277,"z":6},
+		{"x":100,"y":-1495,"z":6},
+		{"x":58.75,"y":-1441.25,"z":6},
+		{"x":57.5,"y":-1495,"z":6},
+		{"x":0,"y":-1440,"z":6},
+		{"x":0,"y":-1495,"z":6},
+		{"x":-50,"y":-1494.9999,"z":6},
+		{"x":-50,"y":-1439.3378,"z":7.324497},
+		{"x":-64.16667,"y":-1495,"z":6},
+		{"x":-68.63635,"y":-1439.091,"z":7.8181725},
+		{"x":-100,"y":-1494.9999,"z":6},
+		{"x":-100,"y":-1438.6755,"z":8.648995},
+		{"x":-128.33334,"y":-1495,"z":6},
+		{"x":-137.2727,"y":-1438.1818,"z":9.636378},
+		{"x":-150,"y":-1494.9999,"z":6},
+		{"x":-150,"y":-1438.0132,"z":9.973526},
+		{"x":-192.50002,"y":-1495,"z":6},
+		{"x":-200,"y":-1450,"z":7.936013},
+		{"x":-205.90906,"y":-1437.2727,"z":11.45455},
+		{"x":-250,"y":-1450,"z":9.084496},
+		{"x":-250,"y":-1436.6887,"z":12.622522},
+		{"x":-256.6667,"y":-1495,"z":6},
+		{"x":-274.5454,"y":-1436.3636,"z":13.272723},
+		{"x":-300,"y":-1494.9999,"z":6},
+		{"x":-300,"y":-1450,"z":10.232978},
+		{"x":-300,"y":-1436.0264,"z":13.947053},
+		{"x":-320.83337,"y":-1495,"z":6},
+		{"x":-343.1818,"y":-1435.4546,"z":15.090897},
+		{"x":-350,"y":-1494.9999,"z":6},
+		{"x":-350,"y":-1450,"z":11.38146},
+		{"x":-385,"y":-1495,"z":6},
+		{"x":-400,"y":-1450,"z":10.610336},
+		{"x":-405,"y":-1475,"z":6},
+		{"x":-411.81818,"y":-1434.5454,"z":11.454548},
+		{"x":-450,"y":-1474.9999,"z":0.8571429},
+		{"x":-450,"y":-1450,"z":3.8835106},
+		{"x":-450,"y":-1434.0398,"z":6.3973427},
+		{"x":-475,"y":-1475,"z":-2},
+		{"x":-480.45453,"y":-1433.6364,"z":2.3636398},
+		{"x":-500,"y":-1474.9999,"z":-4.8571415},
+		{"x":-500,"y":-1450,"z":-2.8433151},
+		{"x":-500,"y":-1433.3776,"z":-0.22517776},
+		{"x":-545,"y":-1475,"z":-10},
+		{"x":-549.0909,"y":-1432.7273,"z":-6.727272},
+		{"x":-550,"y":-1450,"z":-9.570139},
+		{"x":-600,"y":-1450,"z":-16.285715},
+		{"x":-600,"y":-1474.9999,"z":-16.285715},
+		{"x":-600,"y":-1432.053,"z":-13.4702},
+		{"x":-615,"y":-1475,"z":-18},
+		{"x":-617.7273,"y":-1431.8182,"z":-15.818193},
+		{"x":-650,"y":-1450,"z":-22},
+		{"x":-650,"y":-1474.9999,"z":-22},
+		{"x":-650,"y":-1431.3907,"z":-20.09272},
+		{"x":-685,"y":-1475,"z":-26},
+		{"x":-686.36365,"y":-1430.909,"z":-24.909088},
+		{"x":-700,"y":-1450,"z":-27.714287},
+		{"x":-700,"y":-1474.9999,"z":-27.714283},
+		{"x":-700,"y":-1430.7284,"z":-26.71522},
+		{"x":-755,"y":-1430,"z":-34},
+		{"x":-755,"y":-1450,"z":-34},
+		{"x":-755,"y":-1475,"z":-34}
+	],
+	"peopleNum":0,
+	"zoneId":"",
+	"echoMsg":"",
+	"reserveDetail":null,
+	"userWithAvatarList":[],
+	"newUserStates":[],
+	"code":0,
+	"msg":""
+}
+8.
 /*************************************************************************************************************************/