rtc.proto 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. syntax = "proto3";
  2. package rtc;
  3. option go_package = "./rtc";
  4. message ParticipantMetaData{
  5. GroupInfo groupInfo = 1;
  6. GroupMemberFullInfo groupMemberInfo = 2;
  7. PublicUserInfo userInfo = 3;
  8. }
  9. message GroupInfo {
  10. string groupID = 1;
  11. string groupName = 2;
  12. string notification = 3;
  13. string introduction = 4;
  14. string faceURL = 5;
  15. string ownerUserID = 6;
  16. int64 createTime = 7;
  17. uint32 memberCount = 8;
  18. string ex = 9;
  19. int32 status = 10;
  20. string creatorUserID = 11;
  21. int32 groupType = 12;
  22. int32 needVerification = 13;
  23. int32 lookMemberInfo = 14;
  24. int32 applyMemberFriend = 15;
  25. int64 notificationUpdateTime = 16;
  26. string notificationUserID = 17;
  27. bool displayIsRead = 18;
  28. }
  29. message GroupMemberFullInfo {
  30. string groupID = 1;
  31. string userID = 2;
  32. int32 roleLevel = 3;
  33. int64 joinTime = 4;
  34. string nickname = 5;
  35. string faceURL = 6;
  36. int32 appMangerLevel = 7; //if >0
  37. int32 joinSource = 8;
  38. string operatorUserID = 9;
  39. string ex = 10;
  40. int64 muteEndTime = 11;
  41. string inviterUserID = 12;
  42. }
  43. message PublicUserInfo {
  44. string userID = 1;
  45. string nickname = 2;
  46. string faceURL = 3;
  47. string ex = 4;
  48. }
  49. message GetJoinTokenReq{
  50. string room = 1;
  51. string identity = 2;
  52. ParticipantMetaData metaData = 3;
  53. }
  54. message GetJoinTokenResp{
  55. string jwt = 1;
  56. string liveURL = 2;
  57. }
  58. message SignalReq {
  59. oneof payload {
  60. SignalInviteReq invite = 1;
  61. SignalInviteInGroupReq inviteInGroup= 2;
  62. SignalCancelReq cancel = 3;
  63. SignalAcceptReq accept = 4;
  64. SignalHungUpReq hungUp = 5;
  65. SignalRejectReq reject = 6;
  66. SignalGetTokenByRoomIDReq getTokenByRoomID = 7;
  67. }
  68. }
  69. message SignalSendCustomSignalReq {
  70. string roomID = 1;
  71. string customInfo = 2;
  72. }
  73. message SignalSendCustomSignalResp {
  74. }
  75. message SignalGetMeetingsReq {
  76. string userID = 1;
  77. }
  78. message SignalGetMeetingsResp {
  79. repeated MeetingInfo meetingInfoList = 1;
  80. }
  81. message SignalOperateStreamReq {
  82. string streamType = 1;
  83. string roomID = 2;
  84. string userID = 3;
  85. bool mute = 4;
  86. bool muteAll = 5;
  87. }
  88. message SignalOperateStreamResp {
  89. }
  90. message SignalOnStreamChangeReq {
  91. string roomID = 1;
  92. string streamType = 2;
  93. bool mute = 3;
  94. }
  95. message SignalCreateMeetingReq{
  96. int64 meetingDuration = 1;
  97. string roomID = 2;
  98. string meetingName = 3;
  99. string meetingHostUserID = 4;
  100. ParticipantMetaData participant = 5;
  101. repeated string inviteeUserIDList = 6;
  102. int64 startTime = 7;
  103. string ex = 8;
  104. }
  105. message SignalCreateMeetingResp{
  106. string token = 1;
  107. string roomID = 2;
  108. string liveURL = 3;
  109. }
  110. message SignalJoinMeetingReq{
  111. string roomID = 1;
  112. string userID = 2;
  113. ParticipantMetaData participant = 3;
  114. }
  115. message SignalJoinMeetingResp{
  116. string token = 1;
  117. string roomID = 2;
  118. string liveURL = 3;
  119. }
  120. message SignalResp {
  121. oneof payload {
  122. SignalInviteResp invite = 1;
  123. SignalInviteInGroupResp inviteInGroup= 2;
  124. SignalCancelResp cancel = 3;
  125. SignalAcceptResp accept = 4;
  126. SignalHungUpResp hungUp = 5;
  127. SignalRejectResp reject = 6;
  128. SignalGetTokenByRoomIDResp getTokenByRoomID = 7;
  129. }
  130. }
  131. message InvitationInfo {
  132. string inviterUserID = 1;
  133. repeated string inviteeUserIDList = 2;
  134. string customData = 3;
  135. string groupID = 4;
  136. string roomID = 5;
  137. int32 timeout = 6;
  138. string mediaType = 7;
  139. int32 platformID = 8;
  140. int32 sessionType = 9;
  141. int64 initiateTime = 10;
  142. repeated string busyLineUserIDList = 11;
  143. }
  144. message MeetingInfo {
  145. string roomID = 1;
  146. string meetingName = 2;
  147. string ex = 3;
  148. string hostUserID = 4;
  149. repeated string inviteeUserIDList = 5; //邀请列表
  150. int64 createTime = 6;
  151. int64 startTime = 7;
  152. int64 endTime = 8;
  153. bool participantCanUnmuteSelf = 9; //成员是否能自己解除禁言
  154. bool participantCanEnableVideo = 10; //成员是否能开启视频
  155. bool onlyHostInviteUser = 11; //仅主持人可邀请用户
  156. bool onlyHostShareScreen = 12; //仅主持人可共享屏幕
  157. bool joinDisableMicrophone = 13; //加入是否默认关麦克风
  158. bool joinDisableVideo = 14; //加入是否默认关视频
  159. bool isMuteAllVideo = 15; // 是否全员禁用视频
  160. bool isMuteAllMicrophone = 16; // 是否全员禁用麦克风
  161. repeated string canScreenUserIDList = 17; // 可共享屏幕的ID列表
  162. repeated string disableMicrophoneUserIDList = 18; // 当前被禁言麦克风的id列表
  163. repeated string disableVideoUserIDList = 19; // 当前禁用视频流的ID列表
  164. repeated string pinedUserIDList = 20; // 置顶ID列表
  165. repeated string beWatchedUserIDList = 21; // 正在被观看用户列表
  166. }
  167. message SignalInviteReq {
  168. InvitationInfo invitation = 1;
  169. OfflinePushInfo offlinePushInfo = 2;
  170. ParticipantMetaData participant = 3;
  171. string userID = 4;
  172. }
  173. message SignalInviteResp {
  174. string token = 1;
  175. string roomID = 2;
  176. string liveURL = 3;
  177. repeated string busyLineUserIDList = 4;
  178. }
  179. message SignalInviteInGroupReq {
  180. InvitationInfo invitation = 1;
  181. OfflinePushInfo offlinePushInfo = 2;
  182. ParticipantMetaData participant = 3;
  183. string userID = 4;
  184. }
  185. message SignalInviteInGroupResp {
  186. string token = 1;
  187. string roomID = 2;
  188. string liveURL = 3;
  189. repeated string busyLineUserIDList = 4;
  190. }
  191. message SignalCancelReq {
  192. InvitationInfo invitation = 1;
  193. OfflinePushInfo offlinePushInfo = 2;
  194. ParticipantMetaData participant = 3;
  195. string userID = 4;
  196. }
  197. message SignalCancelResp {
  198. }
  199. message SignalAcceptReq {
  200. InvitationInfo invitation = 1;
  201. OfflinePushInfo offlinePushInfo = 2;
  202. ParticipantMetaData participant = 3;
  203. int32 opUserPlatformID = 4;
  204. string userID = 5;
  205. }
  206. message SignalAcceptResp {
  207. string token = 1;
  208. string roomID = 2;
  209. string liveURL = 3;
  210. }
  211. message SignalHungUpReq {
  212. InvitationInfo invitation = 1;
  213. OfflinePushInfo offlinePushInfo = 2;
  214. string userID = 3;
  215. }
  216. message SignalHungUpResp {
  217. }
  218. message SignalRejectReq {
  219. InvitationInfo invitation = 1;
  220. OfflinePushInfo offlinePushInfo = 2;
  221. ParticipantMetaData participant = 3;
  222. int32 opUserPlatformID = 4;
  223. string userID = 5;
  224. }
  225. message SignalRejectResp {
  226. }
  227. message SignalGetRoomByGroupIDReq {
  228. string groupID = 1;
  229. }
  230. message SignalGetRoomByGroupIDResp {
  231. InvitationInfo invitation = 1;
  232. repeated ParticipantMetaData participant = 2;
  233. string roomID = 3;
  234. }
  235. message SignalOnRoomParticipantConnectedReq {
  236. InvitationInfo invitation = 1;
  237. repeated ParticipantMetaData participant = 2;
  238. string groupID = 3;
  239. }
  240. message SignalOnRoomParticipantDisconnectedReq {
  241. InvitationInfo invitation = 1;
  242. repeated ParticipantMetaData participant = 2;
  243. string groupID = 3;
  244. }
  245. message SignalGetTokenByRoomIDReq {
  246. string roomID = 1;
  247. ParticipantMetaData participant = 2;
  248. string userID = 3;
  249. }
  250. message SignalGetTokenByRoomIDResp {
  251. string token = 1;
  252. string liveURL = 2;
  253. }
  254. message SignalUpdateMeetingInfoReq {
  255. string roomID = 1;
  256. StringValue meetingName = 2;
  257. StringValue ex = 3;
  258. repeated string inviteeUserIDList = 4;
  259. Int64Value startTime = 5;
  260. Int64Value endTime = 6;
  261. BoolValue participantCanUnmuteSelf = 7;
  262. BoolValue participantCanEnableVideo = 8;
  263. BoolValue onlyHostInviteUser = 9;
  264. BoolValue onlyHostShareScreen = 10;
  265. BoolValue joinDisableMicrophone = 11;
  266. BoolValue joinDisableVideo = 12;
  267. BoolValue isMuteAllVideo = 13;
  268. BoolValue isMuteAllMicrophone = 14;
  269. repeated string addCanScreenUserIDList = 15;
  270. repeated string reduceCanScreenUserIDList = 16;
  271. repeated string canScreenUserIDList = 17;
  272. repeated string addDisableMicrophoneUserIDList = 18;
  273. repeated string reduceDisableMicrophoneUserIDList = 19;
  274. repeated string disableMicrophoneUserIDList = 20;
  275. repeated string addDisableVideoUserIDList = 21;
  276. repeated string reduceDisableVideoUserIDList = 22;
  277. repeated string disableVideoUserIDList = 23;
  278. repeated string addPinedUserIDList = 24;
  279. repeated string reducePinedUserIDList = 25;
  280. repeated string pinedUserIDList = 26;
  281. repeated string addBeWatchedUserIDList = 27;
  282. repeated string reduceBeWatchedUserIDList = 28;
  283. repeated string beWatchedUserIDList = 29;
  284. }
  285. message SignalUpdateMeetingInfoResp {
  286. }
  287. message SignalCloseRoomReq {
  288. string roomID = 1;
  289. }
  290. message SignalCloseRoomResp {
  291. }
  292. message SignalMessageAssembleReq {
  293. SignalReq signalReq = 1;
  294. }
  295. message SignalMessageAssembleResp {
  296. SignalResp signalResp = 1;
  297. }
  298. message SignalGetRoomsReq {
  299. repeated string roomIDs = 1;
  300. }
  301. message SignalGetRoomsResp {
  302. repeated SignalGetRoomByGroupIDResp roomList = 1;
  303. }
  304. message GetSignalInvitationInfoReq {
  305. string roomID = 1;
  306. }
  307. message GetSignalInvitationInfoResp {
  308. InvitationInfo invitationInfo = 1;
  309. OfflinePushInfo offlinePushInfo = 2;
  310. }
  311. message GetSignalInvitationInfoStartAppReq {
  312. string userID = 1;
  313. }
  314. message GetSignalInvitationInfoStartAppResp {
  315. InvitationInfo invitation = 1;
  316. OfflinePushInfo offlinePushInfo = 2;
  317. }
  318. message OfflinePushInfo {
  319. string title = 1;
  320. string desc = 2;
  321. string ex = 3;
  322. string iOSPushSound = 4;
  323. bool iOSBadgeCount = 5;
  324. string signalInfo = 6;
  325. }
  326. message SignalUser {
  327. string userID = 1;
  328. string nickname = 2;
  329. int32 status = 3;
  330. }
  331. message SignalRecord {
  332. string roomID = 1;
  333. string sID = 2;
  334. string fileName = 3;
  335. string mediaType = 4;
  336. int32 sessionType = 5;
  337. string inviterUserID = 6;
  338. string inviterUserNickname = 7;
  339. string groupID = 8;
  340. string groupName = 9;
  341. repeated SignalUser inviterUsers = 10;
  342. int64 createTime = 11;
  343. int64 endTime = 12;
  344. string size = 13;
  345. string fileURL = 14;
  346. }
  347. message MeetingUser {
  348. string userID = 1;
  349. string nickname = 2;
  350. }
  351. message FileRecord {
  352. string size = 1;
  353. string fileURL = 2;
  354. }
  355. message MeetingRecord {
  356. string roomID = 1;
  357. string meetingName = 2;
  358. string ex = 3;
  359. string hostUserID = 4;
  360. string hostUserNickname = 5;
  361. int64 createTime = 6;
  362. int64 startTime = 7;
  363. int64 endTime = 8;
  364. repeated MeetingUser joinedUsers = 9;
  365. int32 status = 10;
  366. repeated FileRecord fileRecords = 11;
  367. }
  368. message GetSignalInvitationRecordsReq {
  369. RequestPagination pagination = 1;
  370. int32 sessionType = 2;
  371. string sendID = 3;
  372. string recvID = 4;
  373. int64 startTime = 5;
  374. int64 endTime = 6;
  375. repeated UserInfo JoinedUsers = 7;
  376. }
  377. message RequestPagination {
  378. int32 pageNumber = 1;
  379. int32 showNumber = 2;
  380. }
  381. message UserInfo {
  382. string userID = 1;
  383. string nickname = 2;
  384. string faceURL = 3;
  385. string ex = 4;
  386. int64 createTime = 5;
  387. int32 appMangerLevel = 6;
  388. int32 globalRecvMsgOpt = 7;
  389. int32 status = 8;
  390. }
  391. message GetSignalInvitationRecordsResp {
  392. int32 total = 1;
  393. repeated SignalRecord signalRecords = 2;
  394. }
  395. message DeleteSignalRecordsReq {
  396. repeated string sIDs = 1;
  397. }
  398. message DeleteSignalRecordsResp {
  399. }
  400. message GetMeetingRecordsReq {
  401. string hostUserID = 1;
  402. string joinedUserID = 2;
  403. int64 startTime = 3;
  404. int64 endTime = 4;
  405. RequestPagination pagination = 5;
  406. }
  407. message GetMeetingRecordsResp {
  408. int32 total = 1;
  409. repeated MeetingRecord meetingRecords = 2;
  410. }
  411. message DeleteMeetingRecordsReq {
  412. repeated string roomIDs = 1;
  413. }
  414. message DeleteMeetingRecordsResp {
  415. }
  416. service RtcService {
  417. rpc SignalMessageAssemble(SignalMessageAssembleReq) returns(SignalMessageAssembleResp);
  418. rpc SignalGetRoomByGroupID(SignalGetRoomByGroupIDReq) returns(SignalGetRoomByGroupIDResp);
  419. rpc SignalGetTokenByRoomID(SignalGetTokenByRoomIDReq) returns(SignalGetTokenByRoomIDResp);
  420. rpc SignalGetRooms(SignalGetRoomsReq) returns(SignalGetRoomsResp);
  421. rpc GetSignalInvitationInfo(GetSignalInvitationInfoReq) returns(GetSignalInvitationInfoResp);
  422. rpc GetSignalInvitationInfoStartApp(GetSignalInvitationInfoStartAppReq) returns(GetSignalInvitationInfoStartAppResp);
  423. // meeting
  424. rpc SignalCreateMeeting(SignalCreateMeetingReq) returns(SignalCreateMeetingResp);
  425. rpc SignalJoinMeeting(SignalJoinMeetingReq) returns(SignalJoinMeetingResp);
  426. rpc SignalUpdateMeetingInfo(SignalUpdateMeetingInfoReq) returns(SignalUpdateMeetingInfoResp);
  427. rpc SignalCloseRoom(SignalCloseRoomReq) returns(SignalCloseRoomResp);
  428. rpc SignalGetMeetings(SignalGetMeetingsReq) returns(SignalGetMeetingsResp);
  429. rpc SignalOperateStream(SignalOperateStreamReq) returns(SignalOperateStreamResp);
  430. // custom signal
  431. rpc SignalSendCustomSignal(SignalSendCustomSignalReq) returns(SignalSendCustomSignalResp);
  432. // rtc cms
  433. rpc GetSignalInvitationRecords(GetSignalInvitationRecordsReq) returns(GetSignalInvitationRecordsResp);
  434. rpc DeleteSignalRecords(DeleteSignalRecordsReq) returns(DeleteSignalRecordsResp);
  435. rpc GetMeetingRecords(GetMeetingRecordsReq) returns(GetMeetingRecordsResp);
  436. rpc DeleteMeetingRecords(DeleteMeetingRecordsReq) returns(DeleteMeetingRecordsResp);
  437. }
  438. // Wrapper message for `double`.
  439. //
  440. // The JSON representation for `DoubleValue` is JSON number.
  441. message DoubleValue {
  442. // The double value.
  443. double value = 1;
  444. }
  445. // Wrapper message for `float`.
  446. //
  447. // The JSON representation for `FloatValue` is JSON number.
  448. message FloatValue {
  449. // The float value.
  450. float value = 1;
  451. }
  452. // Wrapper message for `int64`.
  453. //
  454. // The JSON representation for `Int64Value` is JSON string.
  455. message Int64Value {
  456. // The int64 value.
  457. int64 value = 1;
  458. }
  459. // Wrapper message for `uint64`.
  460. //
  461. // The JSON representation for `UInt64Value` is JSON string.
  462. message UInt64Value {
  463. // The uint64 value.
  464. uint64 value = 1;
  465. }
  466. // Wrapper message for `int32`.
  467. //
  468. // The JSON representation for `Int32Value` is JSON number.
  469. message Int32Value {
  470. // The int32 value.
  471. int32 value = 1;
  472. }
  473. // Wrapper message for `uint32`.
  474. //
  475. // The JSON representation for `UInt32Value` is JSON number.
  476. message UInt32Value {
  477. // The uint32 value.
  478. uint32 value = 1;
  479. }
  480. // Wrapper message for `bool`.
  481. //
  482. // The JSON representation for `BoolValue` is JSON `true` and `false`.
  483. message BoolValue {
  484. // The bool value.
  485. bool value = 1;
  486. }
  487. // Wrapper message for `string`.
  488. //
  489. // The JSON representation for `StringValue` is JSON string.
  490. message StringValue {
  491. // The string value.
  492. string value = 1;
  493. }
  494. // Wrapper message for `bytes`.
  495. //
  496. // The JSON representation for `BytesValue` is JSON string.
  497. message BytesValue {
  498. // The bytes value.
  499. bytes value = 1;
  500. }