Advertisement
MeKLiN2

Untitled

Nov 10th, 2024
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.48 KB | None | 0 0
  1. i am overriding a websocket for a chat room and i get this message when my script interprets the webrtc, can you tell me what all of the things mean?
  2. {"stumble":"joined","room":{"name":"jimraynor","topic":"2345","broadcast_password":0,"public":0,"guests_allowed":1},"self":{"backgroundcolor":"#000000","namebackgroundcolor":"#00ff00","messagetextcolor":"#eeff00","avatar":1,"handle":"631122","username":"MeKLiN","nick":"Mek","mod":0,"guest":0,"directory":1},"userlist":[{"handle":"631116","avatar":null,"backgroundcolor":"#85A314","namebackgroundcolor":"#10BC14","messagetextcolor":"#FFFFFF","username":"b946249e-aaad-4fb4-b50a-ecff844ceb42","nick":"guest-631116","mod":0,"guest":1},{"handle":"631122","avatar":1,"backgroundcolor":"#000000","namebackgroundcolor":"#00ff00","messagetextcolor":"#eeff00","username":"MeKLiN","nick":"Mek","mod":0,"guest":0}],"broadcasts":[{"handle":"631116","kind":["audio","video"]}],"wshh":{},"dailymotion":{},"soundcloud":{},"twitch":{}}
  3. {"stumble":"subscribe","type":"create","handle":"631116","transport":{"id":"efb129d3-662c-4bf2-98a0-17be9373b256","iceParameters":{"iceLite":true,"password":"lw63ljxkhi7m6epry5b0ugml2383nni4","usernameFragment":"rew1btf2vwd80ondcnp6ky43wl25t98q"},"iceCandidates":[{"foundation":"udpcandidate","ip":"185.142.238.88","port":11011,"priority":1076558079,"protocol":"udp","type":"host"},{"foundation":"tcpcandidate","ip":"185.142.238.88","port":19691,"priority":1076302079,"protocol":"tcp","tcpType":"passive","type":"host"}],"dtlsParameters":{"fingerprints":[{"algorithm":"sha-256","value":"2F:A9:08:60:83:71:A0:67:62:F8:92:E2:6C:A6:B2:E2:6F:C5:84:B5:A9:88:8E:5E:F1:F0:C6:F9:60:8F:38:81"},{"algorithm":"sha-224","value":"80:6C:59:C5:68:44:A7:DF:2B:CE:F7:CD:A8:F4:3F:30:9D:55:9B:69:92:D5:68:BA:FA:30:59:16"},{"algorithm":"sha-1","value":"3D:34:24:8C:13:AF:B9:B4:99:59:6E:EA:31:FF:7F:B4:60:E3:BE:03"},{"algorithm":"sha-384","value":"F4:BD:F2:C4:5A:F4:68:74:23:86:7C:F3:07:08:79:21:07:B5:8B:D2:B1:61:5A:7B:A6:F3:5D:9D:11:E9:FF:17:9E:42:3B:96:CB:D6:ED:F9:C6:B4:E9:2E:7F:97:46:A8"},{"algorithm":"sha-512","value":"37:12:F3:12:A3:B0:8A:EE:45:D1:73:26:0C:BE:17:08:2B:F9:EA:6D:DE:1E:9A:86:9F:10:D0:CF:E5:FB:98:51:3B:B0:94:08:7E:01:BF:64:E5:F0:F4:3A:CD:1A:76:7A:01:0E:AC:CD:70:09:EC:1C:92:C2:CA:44:DB:05:4B:BE"}],"role":"auto"}}}
  4. {"stumble":"subscribe","type":"consume","handle":"631116","consume":{"id":"2d12a124-4a59-4479-bb0a-22b0e5fe4dee","kind":"audio","rtpParameters":{"codecs":[{"mimeType":"audio/opus","payloadType":100,"clockRate":48000,"channels":2,"parameters":{"minptime":10,"useinbandfec":1},"rtcpFeedback":[]}],"headerExtensions":[{"uri":"urn:ietf:params:rtp-hdrext:sdes:mid","id":1,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time","id":4,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:ssrc-audio-level","id":10,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time","id":13,"encrypt":false,"parameters":{}}],"encodings":[{"ssrc":707336886}],"rtcp":{"cname":"i+fDOlmkHWgJU+GC","reducedSize":true,"mux":true},"mid":"0"},"type":"simple","producerId":"1daa0713-73af-4dd0-bdf6-8e06ebb57ca3"}}
  5. {"stumble":"subscribe","type":"consume","handle":"631116","consume":{"id":"ea7043fe-d3b5-49c9-9bb9-704d3ada2e45","kind":"video","rtpParameters":{"codecs":[{"mimeType":"video/VP8","payloadType":101,"clockRate":90000,"parameters":{},"rtcpFeedback":[{"type":"nack","parameter":""},{"type":"nack","parameter":"pli"},{"type":"ccm","parameter":"fir"},{"type":"transport-cc","parameter":""}]},{"mimeType":"video/rtx","payloadType":102,"clockRate":90000,"parameters":{"apt":101},"rtcpFeedback":[]}],"headerExtensions":[{"uri":"urn:ietf:params:rtp-hdrext:sdes:mid","id":1,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time","id":4,"encrypt":false,"parameters":{}},{"uri":"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01","id":5,"encrypt":false,"parameters":{}},{"uri":"http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07","id":6,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:framemarking","id":7,"encrypt":false,"parameters":{}},{"uri":"urn:3gpp:video-orientation","id":11,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:toffset","id":12,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time","id":13,"encrypt":false,"parameters":{}}],"encodings":[{"ssrc":659550737,"rtx":{"ssrc":659550738}}],"rtcp":{"cname":"i+fDOlmkHWgJU+GC","reducedSize":true,"mux":true},"mid":"1"},"type":"simple","producerId":"24efce1a-2373-4188-8253-fd667d6a2099"}}
  6. {"stumble":"subscribe","type":"connected","handle":"631116"}
  7. {"stumble":"quit","handle":"631116"}
  8. {"stumble":"join","backgroundcolor":"#3CB98E","namebackgroundcolor":"#667CEE","messagetextcolor":"#FFFFFF","avatar":0,"handle":"631123","username":"c5356310-d0de-48c5-bb97-75b979f26ea6","guest":1,"nick":"guest-631123","mod":0}
  9. {"stumble":"producers","producers": [{"handle":"631123","kind": ["audio"]}]}
  10. {"stumble":"producers","producers": [{"handle":"631123","kind": ["video"]}]}
  11. {"stumble":"subscribe","type":"create","handle":"631123","transport":{"id":"6d4f2377-19ce-4e23-a8e7-35bc43a37154","iceParameters":{"iceLite":true,"password":"460z0x25tpkuhgq7db5wl2j6eehnmtn8","usernameFragment":"6oul6b8fnzio3ukdfp3q7k54cg714fh6"},"iceCandidates":[{"foundation":"udpcandidate","ip":"185.165.190.98","port":11068,"priority":1076558079,"protocol":"udp","type":"host"},{"foundation":"tcpcandidate","ip":"185.165.190.98","port":12338,"priority":1076302079,"protocol":"tcp","tcpType":"passive","type":"host"}],"dtlsParameters":{"fingerprints":[{"algorithm":"sha-224","value":"12:69:D7:A5:65:5C:03:3D:D6:1D:E9:D6:E4:67:D8:D8:BF:E5:79:A0:D6:F9:17:67:4D:5F:EA:53"},{"algorithm":"sha-256","value":"93:94:75:AB:A6:C0:7C:26:F0:38:5D:A3:A4:5F:62:0D:48:FD:3B:5D:9D:5F:B9:E1:EC:31:C8:F3:49:85:F7:A2"},{"algorithm":"sha-512","value":"7C:CA:17:A6:43:AD:3D:97:47:8A:B2:05:2A:CD:5B:A5:6C:85:30:20:A0:00:0E:5B:2A:45:45:87:11:2B:B4:02:2B:7F:AA:F6:C6:DF:35:30:44:53:26:70:CB:E5:48:B1:1C:19:0D:91:93:5E:BE:53:2E:7F:D3:4C:35:11:A5:A7"},{"algorithm":"sha-1","value":"F1:04:77:33:33:3E:3C:56:1C:E0:3A:92:5F:2E:AE:A6:E6:1B:27:FD"},{"algorithm":"sha-384","value":"D6:ED:79:9B:FD:97:E6:83:0B:C4:C9:E0:C3:3E:25:AF:F4:25:D2:7B:CB:0E:5F:26:87:09:0B:02:70:89:F5:9B:CB:7C:83:12:B5:CB:D2:6A:9A:D4:FA:B6:8A:01:FC:64"}],"role":"auto"}}}
  12. {"stumble":"subscribe","type":"consume","handle":"631123","consume":{"id":"36a1f6e2-dfb4-4fc4-b599-8b072e70723c","kind":"audio","rtpParameters":{"codecs":[{"mimeType":"audio/opus","payloadType":100,"clockRate":48000,"channels":2,"parameters":{"minptime":10,"useinbandfec":1},"rtcpFeedback":[]}],"headerExtensions":[{"uri":"urn:ietf:params:rtp-hdrext:sdes:mid","id":1,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time","id":4,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:ssrc-audio-level","id":10,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time","id":13,"encrypt":false,"parameters":{}}],"encodings":[{"ssrc":767609488}],"rtcp":{"cname":"EwKiHcOSmev6I90w","reducedSize":true,"mux":true},"mid":"0"},"type":"simple","producerId":"05b5617f-b6e9-44b6-9167-b6d50d767fa9"}}
  13. {"stumble":"subscribe","type":"consume","handle":"631123","consume":{"id":"0516b7d6-e9b2-40c4-b557-f6efb3cc6105","kind":"video","rtpParameters":{"codecs":[{"mimeType":"video/VP8","payloadType":101,"clockRate":90000,"parameters":{},"rtcpFeedback":[{"type":"nack","parameter":""},{"type":"nack","parameter":"pli"},{"type":"ccm","parameter":"fir"},{"type":"transport-cc","parameter":""}]},{"mimeType":"video/rtx","payloadType":102,"clockRate":90000,"parameters":{"apt":101},"rtcpFeedback":[]}],"headerExtensions":[{"uri":"urn:ietf:params:rtp-hdrext:sdes:mid","id":1,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time","id":4,"encrypt":false,"parameters":{}},{"uri":"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01","id":5,"encrypt":false,"parameters":{}},{"uri":"http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07","id":6,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:framemarking","id":7,"encrypt":false,"parameters":{}},{"uri":"urn:3gpp:video-orientation","id":11,"encrypt":false,"parameters":{}},{"uri":"urn:ietf:params:rtp-hdrext:toffset","id":12,"encrypt":false,"parameters":{}},{"uri":"http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time","id":13,"encrypt":false,"parameters":{}}],"encodings":[{"ssrc":370731456,"rtx":{"ssrc":370731457}}],"rtcp":{"cname":"EwKiHcOSmev6I90w","reducedSize":true,"mux":true},"mid":"1"},"type":"simple","producerId":"e1e7e3dd-3fca-405a-baea-a771cb624fa2"}}
  14. {"stumble":"subscribe","type":"connected","handle":"631123"}
  15.  
  16. ChatGPT said:
  17. ChatGPT
  18. The WebSocket messages you're receiving represent different events and actions related to a WebRTC-based chat system. Here's a breakdown of the key parts of the JSON message:
  19.  
  20. 1. stumble
  21. "stumble" is a key that identifies the event type. Different stumble events include "joined", "subscribe", "quit", "producers", etc.
  22. "joined": The user has joined a room.
  23. "subscribe": Subscribing to different media streams.
  24. "quit": The user has left the room.
  25. "producers": List of media producers (users sending audio or video).
  26. 2. room
  27. Contains room metadata, such as:
  28. "name": The name of the chat room (e.g., "jimraynor").
  29. "topic": A topic identifier or description (e.g., "2345").
  30. "broadcast_password": Whether the room requires a password to broadcast (0 means no password).
  31. "public": Whether the room is public or private.
  32. "guests_allowed": Whether guests are allowed (1 means allowed).
  33. 3. self
  34. Represents the current user's information, such as:
  35. "backgroundcolor": Color for the user's background.
  36. "namebackgroundcolor": Color for the user's name background.
  37. "messagetextcolor": Color for the message text.
  38. "avatar": Whether the user has an avatar (1 means they do).
  39. "handle": Unique user identifier.
  40. "username": The username of the user.
  41. "nick": A nickname for the user (e.g., "MeKLiN").
  42. "mod": Whether the user is a moderator (0 means not).
  43. "guest": Whether the user is a guest (0 means not).
  44. "directory": Directory information for the user (e.g., whether they are visible in the room's directory).
  45. 4. userlist
  46. A list of users in the room, each containing:
  47. "handle": Unique user identifier.
  48. "avatar": Avatar status.
  49. "backgroundcolor", "namebackgroundcolor", "messagetextcolor": User's color settings.
  50. "username", "nick": Username and nickname.
  51. "mod", "guest": User role (moderator or guest).
  52. 5. broadcasts
  53. Contains the media types a user is broadcasting, such as audio or video.
  54. Example: "kind": ["audio", "video"] means the user is broadcasting both audio and video.
  55. 6. wshh, dailymotion, soundcloud, twitch
  56. These appear to be placeholders or objects related to different media platforms but are empty in your message.
  57. 7. transport
  58. Contains details related to the WebRTC transport setup.
  59. "id": Unique transport ID.
  60. "iceParameters": ICE (Interactive Connectivity Establishment) parameters, including a password and username fragment for peer-to-peer connection.
  61. "iceCandidates": List of network candidates for connecting peers (UDP and TCP options, with IP addresses and ports).
  62. "dtlsParameters": Parameters for DTLS (Datagram Transport Layer Security), including fingerprints for securing the connection.
  63. 8. consume
  64. Represents a subscription to a media stream (audio/video).
  65. "consume" object contains:
  66. "id": Unique ID of the media being consumed.
  67. "kind": Type of media (audio/video).
  68. "rtpParameters": RTP (Real-time Transport Protocol) parameters defining the media stream characteristics, such as codecs, payload types, feedback mechanisms, etc.
  69. "encodings": Defines encoding settings for media.
  70. "rtcp": RTCP (Real-time Transport Control Protocol) settings for feedback, error handling, and synchronization.
  71. "producerId": The ID of the producer of the media.
  72. 9. connected
  73. Indicates the user is successfully connected to the room or WebRTC stream.
  74. Example Breakdown:
  75. Example Message:
  76. json
  77. Copy code
  78. {
  79. "stumble": "subscribe",
  80. "type": "create",
  81. "handle": "631116",
  82. "transport": {
  83. "id": "efb129d3-662c-4bf2-98a0-17be9373b256",
  84. "iceParameters": {
  85. "iceLite": true,
  86. "password": "lw63ljxkhi7m6epry5b0ugml2383nni4",
  87. "usernameFragment": "rew1btf2vwd80ondcnp6ky43wl25t98q"
  88. },
  89. "iceCandidates": [
  90. {
  91. "foundation": "udpcandidate",
  92. "ip": "185.142.238.88",
  93. "port": 11011,
  94. "priority": 1076558079,
  95. "protocol": "udp",
  96. "type": "host"
  97. },
  98. {
  99. "foundation": "tcpcandidate",
  100. "ip": "185.142.238.88",
  101. "port": 19691,
  102. "priority": 1076302079,
  103. "protocol": "tcp",
  104. "tcpType": "passive",
  105. "type": "host"
  106. }
  107. ],
  108. "dtlsParameters": {
  109. "fingerprints": [
  110. {
  111. "algorithm": "sha-256",
  112. "value": "2F:A9:08:60:83:71:A0:67:62:F8:92:E2:6C:A6:B2:E2:6F:C5:84:B5:A9:88:8E:5E:F1:F0:C6:F9:60:8F:38:81"
  113. }
  114. ],
  115. "role": "auto"
  116. }
  117. }
  118. }
  119. This message indicates that a user with handle "631116" is subscribing to a WebRTC transport stream, where the connection is being established using ICE candidates (UDP and TCP) and DTLS encryption for secure communication. The iceLite flag means that it's using a simplified ICE implementation, and role: "auto" implies an automatic role assignment.
  120.  
  121. Let me know if you need further clarification on any part!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement