@livekit/rtc-node 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/audio_frame.cjs +2 -2
  2. package/dist/audio_frame.cjs.map +1 -1
  3. package/dist/audio_frame.d.cts +31 -0
  4. package/dist/audio_frame.d.ts +11 -5
  5. package/dist/audio_frame.d.ts.map +1 -1
  6. package/dist/audio_frame.js +3 -3
  7. package/dist/audio_frame.js.map +1 -1
  8. package/dist/audio_resampler.cjs +10 -7
  9. package/dist/audio_resampler.cjs.map +1 -1
  10. package/dist/audio_resampler.d.cts +59 -0
  11. package/dist/audio_resampler.d.ts +11 -3
  12. package/dist/audio_resampler.d.ts.map +1 -1
  13. package/dist/audio_resampler.js +13 -10
  14. package/dist/audio_resampler.js.map +1 -1
  15. package/dist/audio_source.cjs +6 -4
  16. package/dist/audio_source.cjs.map +1 -1
  17. package/dist/audio_source.d.cts +37 -0
  18. package/dist/audio_source.d.ts +13 -5
  19. package/dist/audio_source.d.ts.map +1 -1
  20. package/dist/audio_source.js +9 -7
  21. package/dist/audio_source.js.map +1 -1
  22. package/dist/audio_stream.cjs +1 -2
  23. package/dist/audio_stream.cjs.map +1 -1
  24. package/dist/audio_stream.d.cts +37 -0
  25. package/dist/audio_stream.d.ts +16 -5
  26. package/dist/audio_stream.d.ts.map +1 -1
  27. package/dist/audio_stream.js +2 -3
  28. package/dist/audio_stream.js.map +1 -1
  29. package/dist/e2ee.cjs +19 -20
  30. package/dist/e2ee.cjs.map +1 -1
  31. package/dist/e2ee.d.cts +47 -0
  32. package/dist/e2ee.d.ts +11 -8
  33. package/dist/e2ee.d.ts.map +1 -1
  34. package/dist/e2ee.js +29 -30
  35. package/dist/e2ee.js.map +1 -1
  36. package/dist/ffi_client.cjs +6 -5
  37. package/dist/ffi_client.cjs.map +1 -1
  38. package/dist/ffi_client.d.cts +35 -0
  39. package/dist/ffi_client.d.ts +23 -11
  40. package/dist/ffi_client.d.ts.map +1 -1
  41. package/dist/ffi_client.js +6 -10
  42. package/dist/ffi_client.js.map +1 -1
  43. package/dist/index.cjs +16 -49
  44. package/dist/index.cjs.map +1 -1
  45. package/dist/index.d.cts +28 -0
  46. package/dist/index.d.ts +20 -41
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +7 -46
  49. package/dist/index.js.map +1 -1
  50. package/dist/napi/native.d.cjs.map +1 -1
  51. package/dist/napi/native.d.d.cts +21 -0
  52. package/dist/napi/native.d.d.ts +21 -0
  53. package/dist/napi/native.d.ts +5 -5
  54. package/dist/native.d.ts +5 -5
  55. package/dist/participant.cjs +57 -34
  56. package/dist/participant.cjs.map +1 -1
  57. package/dist/participant.d.cts +126 -0
  58. package/dist/participant.d.ts +34 -20
  59. package/dist/participant.d.ts.map +1 -1
  60. package/dist/participant.js +75 -50
  61. package/dist/participant.js.map +1 -1
  62. package/dist/proto/audio_frame_pb.cjs +977 -125
  63. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  64. package/dist/proto/audio_frame_pb.d.cts +898 -0
  65. package/dist/proto/audio_frame_pb.d.ts +506 -417
  66. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  67. package/dist/proto/audio_frame_pb.js +943 -85
  68. package/dist/proto/audio_frame_pb.js.map +1 -1
  69. package/dist/proto/e2ee_pb.cjs +700 -85
  70. package/dist/proto/e2ee_pb.cjs.map +1 -1
  71. package/dist/proto/e2ee_pb.d.cts +653 -0
  72. package/dist/proto/e2ee_pb.d.ts +333 -263
  73. package/dist/proto/e2ee_pb.d.ts.map +1 -1
  74. package/dist/proto/e2ee_pb.js +675 -57
  75. package/dist/proto/e2ee_pb.js.map +1 -1
  76. package/dist/proto/ffi_pb.cjs +369 -36
  77. package/dist/proto/ffi_pb.cjs.map +1 -1
  78. package/dist/proto/ffi_pb.d.cts +898 -0
  79. package/dist/proto/ffi_pb.d.ts +164 -112
  80. package/dist/proto/ffi_pb.d.ts.map +1 -1
  81. package/dist/proto/ffi_pb.js +364 -29
  82. package/dist/proto/ffi_pb.js.map +1 -1
  83. package/dist/proto/handle_pb.cjs +27 -7
  84. package/dist/proto/handle_pb.cjs.map +1 -1
  85. package/dist/proto/handle_pb.d.cts +31 -0
  86. package/dist/proto/handle_pb.d.ts +15 -15
  87. package/dist/proto/handle_pb.d.ts.map +1 -1
  88. package/dist/proto/handle_pb.js +26 -5
  89. package/dist/proto/handle_pb.js.map +1 -1
  90. package/dist/proto/participant_pb.cjs +112 -15
  91. package/dist/proto/participant_pb.cjs.map +1 -1
  92. package/dist/proto/participant_pb.d.cts +181 -0
  93. package/dist/proto/participant_pb.d.ts +143 -53
  94. package/dist/proto/participant_pb.d.ts.map +1 -1
  95. package/dist/proto/participant_pb.js +109 -11
  96. package/dist/proto/participant_pb.js.map +1 -1
  97. package/dist/proto/room_pb.cjs +2693 -302
  98. package/dist/proto/room_pb.cjs.map +1 -1
  99. package/dist/proto/room_pb.d.cts +2475 -0
  100. package/dist/proto/room_pb.d.ts +1269 -864
  101. package/dist/proto/room_pb.d.ts.map +1 -1
  102. package/dist/proto/room_pb.js +2603 -210
  103. package/dist/proto/room_pb.js.map +1 -1
  104. package/dist/proto/rpc_pb.cjs +302 -37
  105. package/dist/proto/rpc_pb.cjs.map +1 -1
  106. package/dist/proto/rpc_pb.d.cts +267 -0
  107. package/dist/proto/rpc_pb.d.ts +140 -108
  108. package/dist/proto/rpc_pb.d.ts.map +1 -1
  109. package/dist/proto/rpc_pb.js +291 -25
  110. package/dist/proto/rpc_pb.js.map +1 -1
  111. package/dist/proto/stats_pb.cjs +1253 -139
  112. package/dist/proto/stats_pb.cjs.map +1 -1
  113. package/dist/proto/stats_pb.d.cts +1764 -0
  114. package/dist/proto/stats_pb.d.ts +806 -693
  115. package/dist/proto/stats_pb.d.ts.map +1 -1
  116. package/dist/proto/stats_pb.js +1216 -93
  117. package/dist/proto/stats_pb.js.map +1 -1
  118. package/dist/proto/track_pb.cjs +462 -64
  119. package/dist/proto/track_pb.cjs.map +1 -1
  120. package/dist/proto/track_pb.d.cts +434 -0
  121. package/dist/proto/track_pb.d.ts +254 -220
  122. package/dist/proto/track_pb.d.ts.map +1 -1
  123. package/dist/proto/track_pb.js +447 -45
  124. package/dist/proto/track_pb.js.map +1 -1
  125. package/dist/proto/track_publication_pb.cjs +130 -0
  126. package/dist/proto/track_publication_pb.cjs.map +1 -0
  127. package/dist/proto/track_publication_pb.d.cts +80 -0
  128. package/dist/proto/track_publication_pb.d.ts +80 -0
  129. package/dist/proto/track_publication_pb.d.ts.map +1 -0
  130. package/dist/proto/track_publication_pb.js +103 -0
  131. package/dist/proto/track_publication_pb.js.map +1 -0
  132. package/dist/proto/video_frame_pb.cjs +648 -88
  133. package/dist/proto/video_frame_pb.cjs.map +1 -1
  134. package/dist/proto/video_frame_pb.d.cts +660 -0
  135. package/dist/proto/video_frame_pb.d.ts +375 -328
  136. package/dist/proto/video_frame_pb.d.ts.map +1 -1
  137. package/dist/proto/video_frame_pb.js +626 -60
  138. package/dist/proto/video_frame_pb.js.map +1 -1
  139. package/dist/room.cjs +93 -125
  140. package/dist/room.cjs.map +1 -1
  141. package/dist/room.d.cts +123 -0
  142. package/dist/room.d.ts +37 -34
  143. package/dist/room.d.ts.map +1 -1
  144. package/dist/room.js +92 -122
  145. package/dist/room.js.map +1 -1
  146. package/dist/rpc.cjs.map +1 -1
  147. package/dist/rpc.d.cts +81 -0
  148. package/dist/rpc.d.ts +10 -7
  149. package/dist/rpc.js.map +1 -1
  150. package/dist/track.cjs +12 -8
  151. package/dist/track.cjs.map +1 -1
  152. package/dist/track.d.cts +45 -0
  153. package/dist/track.d.ts +30 -20
  154. package/dist/track.d.ts.map +1 -1
  155. package/dist/track.js +13 -9
  156. package/dist/track.js.map +1 -1
  157. package/dist/track_publication.cjs +21 -12
  158. package/dist/track_publication.cjs.map +1 -1
  159. package/dist/track_publication.d.cts +47 -0
  160. package/dist/track_publication.d.ts +30 -19
  161. package/dist/track_publication.d.ts.map +1 -1
  162. package/dist/track_publication.js +22 -13
  163. package/dist/track_publication.js.map +1 -1
  164. package/dist/transcription.d.cts +15 -0
  165. package/dist/transcription.d.ts +4 -3
  166. package/dist/types.d.cts +9 -0
  167. package/dist/types.d.ts +3 -2
  168. package/dist/version.cjs +1 -1
  169. package/dist/version.cjs.map +1 -1
  170. package/dist/version.d.cts +3 -0
  171. package/dist/version.d.ts +3 -2
  172. package/dist/version.js +1 -1
  173. package/dist/version.js.map +1 -1
  174. package/dist/video_frame.cjs +26 -45
  175. package/dist/video_frame.cjs.map +1 -1
  176. package/dist/video_frame.d.cts +24 -0
  177. package/dist/video_frame.d.ts +10 -4
  178. package/dist/video_frame.d.ts.map +1 -1
  179. package/dist/video_frame.js +29 -48
  180. package/dist/video_frame.js.map +1 -1
  181. package/dist/video_source.cjs +7 -4
  182. package/dist/video_source.cjs.map +1 -1
  183. package/dist/video_source.d.cts +22 -0
  184. package/dist/video_source.d.ts +14 -7
  185. package/dist/video_source.d.ts.map +1 -1
  186. package/dist/video_source.js +9 -6
  187. package/dist/video_source.js.map +1 -1
  188. package/dist/video_stream.cjs +16 -5
  189. package/dist/video_stream.cjs.map +1 -1
  190. package/dist/video_stream.d.cts +40 -0
  191. package/dist/video_stream.d.ts +18 -7
  192. package/dist/video_stream.d.ts.map +1 -1
  193. package/dist/video_stream.js +17 -6
  194. package/dist/video_stream.js.map +1 -1
  195. package/package.json +17 -12
  196. package/src/audio_frame.ts +10 -10
  197. package/src/audio_resampler.ts +15 -13
  198. package/src/audio_source.ts +11 -8
  199. package/src/audio_stream.ts +3 -4
  200. package/src/e2ee.ts +36 -37
  201. package/src/ffi_client.ts +8 -16
  202. package/src/index.ts +5 -68
  203. package/src/napi/native.d.ts +5 -5
  204. package/src/participant.ts +100 -72
  205. package/src/proto/audio_frame_pb.ts +1220 -496
  206. package/src/proto/e2ee_pb.ts +858 -337
  207. package/src/proto/ffi_pb.ts +442 -135
  208. package/src/proto/handle_pb.ts +33 -19
  209. package/src/proto/participant_pb.ts +225 -60
  210. package/src/proto/room_pb.ts +3149 -1013
  211. package/src/proto/rpc_pb.ts +358 -129
  212. package/src/proto/stats_pb.ts +1891 -877
  213. package/src/proto/track_pb.ts +587 -253
  214. package/src/proto/track_publication_pb.ts +180 -0
  215. package/src/proto/video_frame_pb.ts +861 -394
  216. package/src/room.ts +143 -188
  217. package/src/rpc.ts +1 -1
  218. package/src/track.ts +16 -17
  219. package/src/track_publication.ts +25 -26
  220. package/src/version.ts +1 -1
  221. package/src/video_frame.ts +48 -72
  222. package/src/video_source.ts +11 -8
  223. package/src/video_stream.ts +18 -8
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/proto/video_frame_pb.ts"],"sourcesContent":["// Copyright 2023 LiveKit, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v2.2.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file video_frame.proto (package livekit.proto, syntax proto2)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv1\";\nimport { enumDesc, fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv1\";\nimport type { FfiOwnedHandle } from \"./handle_pb.js\";\nimport { file_handle } from \"./handle_pb.js\";\nimport type { TrackSource } from \"./track_pb.js\";\nimport { file_track } from \"./track_pb.js\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file video_frame.proto.\n */\nexport const file_video_frame: GenFile = /*@__PURE__*/\n fileDesc(\"ChF2aWRlb19mcmFtZS5wcm90bxINbGl2ZWtpdC5wcm90byKlAQoVTmV3VmlkZW9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AISBwoDVlA5EAMqbAoNVmlkZW9Sb3RhdGlvbhIUChBWSURFT19ST1RBVElPTl8wEAASFQoRVklERU9fUk9UQVRJT05fOTAQARIWChJWSURFT19ST1RBVElPTl8xODAQAhIWChJWSURFT19ST1RBVElPTl8yNzAQAyqBAQoPVmlkZW9CdWZmZXJUeXBlEggKBFJHQkEQABIICgRBQkdSEAESCAoEQVJHQhACEggKBEJHUkEQAxIJCgVSR0IyNBAEEggKBEk0MjAQBRIJCgVJNDIwQRAGEggKBEk0MjIQBxIICgRJNDQ0EAgSCAoESTAxMBAJEggKBE5WMTIQCipZCg9WaWRlb1N0cmVhbVR5cGUSFwoTVklERU9fU1RSRUFNX05BVElWRRAAEhYKElZJREVPX1NUUkVBTV9XRUJHTBABEhUKEVZJREVPX1NUUkVBTV9IVE1MEAIqKgoPVmlkZW9Tb3VyY2VUeXBlEhcKE1ZJREVPX1NPVVJDRV9OQVRJVkUQAEIQqgINTGl2ZUtpdC5Qcm90bw\", [file_handle, file_track]);\n\n/**\n * Create a new VideoStream\n * VideoStream is used to receive video frames from a track\n *\n * @generated from message livekit.proto.NewVideoStreamRequest\n */\nexport type NewVideoStreamRequest = Message<\"livekit.proto.NewVideoStreamRequest\"> & {\n /**\n * @generated from field: required uint64 track_handle = 1;\n */\n trackHandle: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 2;\n */\n type: VideoStreamType;\n\n /**\n * Get the frame on a specific format\n *\n * @generated from field: optional livekit.proto.VideoBufferType format = 3;\n */\n format: VideoBufferType;\n\n /**\n * if true, stride will be set to width/chroma_width\n *\n * @generated from field: optional bool normalize_stride = 4;\n */\n normalizeStride: boolean;\n};\n\n/**\n * Describes the message livekit.proto.NewVideoStreamRequest.\n * Use `create(NewVideoStreamRequestSchema)` to create a new message.\n */\nexport const NewVideoStreamRequestSchema: GenMessage<NewVideoStreamRequest> = /*@__PURE__*/\n messageDesc(file_video_frame, 0);\n\n/**\n * @generated from message livekit.proto.NewVideoStreamResponse\n */\nexport type NewVideoStreamResponse = Message<\"livekit.proto.NewVideoStreamResponse\"> & {\n /**\n * @generated from field: required livekit.proto.OwnedVideoStream stream = 1;\n */\n stream?: OwnedVideoStream;\n};\n\n/**\n * Describes the message livekit.proto.NewVideoStreamResponse.\n * Use `create(NewVideoStreamResponseSchema)` to create a new message.\n */\nexport const NewVideoStreamResponseSchema: GenMessage<NewVideoStreamResponse> = /*@__PURE__*/\n messageDesc(file_video_frame, 1);\n\n/**\n * Request a video stream from a participant\n *\n * @generated from message livekit.proto.VideoStreamFromParticipantRequest\n */\nexport type VideoStreamFromParticipantRequest = Message<\"livekit.proto.VideoStreamFromParticipantRequest\"> & {\n /**\n * @generated from field: required uint64 participant_handle = 1;\n */\n participantHandle: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 2;\n */\n type: VideoStreamType;\n\n /**\n * @generated from field: required livekit.proto.TrackSource track_source = 3;\n */\n trackSource: TrackSource;\n\n /**\n * @generated from field: optional livekit.proto.VideoBufferType format = 4;\n */\n format: VideoBufferType;\n\n /**\n * @generated from field: optional bool normalize_stride = 5;\n */\n normalizeStride: boolean;\n};\n\n/**\n * Describes the message livekit.proto.VideoStreamFromParticipantRequest.\n * Use `create(VideoStreamFromParticipantRequestSchema)` to create a new message.\n */\nexport const VideoStreamFromParticipantRequestSchema: GenMessage<VideoStreamFromParticipantRequest> = /*@__PURE__*/\n messageDesc(file_video_frame, 2);\n\n/**\n * @generated from message livekit.proto.VideoStreamFromParticipantResponse\n */\nexport type VideoStreamFromParticipantResponse = Message<\"livekit.proto.VideoStreamFromParticipantResponse\"> & {\n /**\n * @generated from field: required livekit.proto.OwnedVideoStream stream = 1;\n */\n stream?: OwnedVideoStream;\n};\n\n/**\n * Describes the message livekit.proto.VideoStreamFromParticipantResponse.\n * Use `create(VideoStreamFromParticipantResponseSchema)` to create a new message.\n */\nexport const VideoStreamFromParticipantResponseSchema: GenMessage<VideoStreamFromParticipantResponse> = /*@__PURE__*/\n messageDesc(file_video_frame, 3);\n\n/**\n * Create a new VideoSource\n * VideoSource is used to send video frame to a track\n *\n * @generated from message livekit.proto.NewVideoSourceRequest\n */\nexport type NewVideoSourceRequest = Message<\"livekit.proto.NewVideoSourceRequest\"> & {\n /**\n * @generated from field: required livekit.proto.VideoSourceType type = 1;\n */\n type: VideoSourceType;\n\n /**\n * Used to determine which encodings to use + simulcast layers\n * Most of the time it corresponds to the source resolution \n *\n * @generated from field: required livekit.proto.VideoSourceResolution resolution = 2;\n */\n resolution?: VideoSourceResolution;\n};\n\n/**\n * Describes the message livekit.proto.NewVideoSourceRequest.\n * Use `create(NewVideoSourceRequestSchema)` to create a new message.\n */\nexport const NewVideoSourceRequestSchema: GenMessage<NewVideoSourceRequest> = /*@__PURE__*/\n messageDesc(file_video_frame, 4);\n\n/**\n * @generated from message livekit.proto.NewVideoSourceResponse\n */\nexport type NewVideoSourceResponse = Message<\"livekit.proto.NewVideoSourceResponse\"> & {\n /**\n * @generated from field: required livekit.proto.OwnedVideoSource source = 1;\n */\n source?: OwnedVideoSource;\n};\n\n/**\n * Describes the message livekit.proto.NewVideoSourceResponse.\n * Use `create(NewVideoSourceResponseSchema)` to create a new message.\n */\nexport const NewVideoSourceResponseSchema: GenMessage<NewVideoSourceResponse> = /*@__PURE__*/\n messageDesc(file_video_frame, 5);\n\n/**\n * Push a frame to a VideoSource\n *\n * @generated from message livekit.proto.CaptureVideoFrameRequest\n */\nexport type CaptureVideoFrameRequest = Message<\"livekit.proto.CaptureVideoFrameRequest\"> & {\n /**\n * @generated from field: required uint64 source_handle = 1;\n */\n sourceHandle: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2;\n */\n buffer?: VideoBufferInfo;\n\n /**\n * In microseconds\n *\n * @generated from field: required int64 timestamp_us = 3;\n */\n timestampUs: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoRotation rotation = 4;\n */\n rotation: VideoRotation;\n};\n\n/**\n * Describes the message livekit.proto.CaptureVideoFrameRequest.\n * Use `create(CaptureVideoFrameRequestSchema)` to create a new message.\n */\nexport const CaptureVideoFrameRequestSchema: GenMessage<CaptureVideoFrameRequest> = /*@__PURE__*/\n messageDesc(file_video_frame, 6);\n\n/**\n * @generated from message livekit.proto.CaptureVideoFrameResponse\n */\nexport type CaptureVideoFrameResponse = Message<\"livekit.proto.CaptureVideoFrameResponse\"> & {\n};\n\n/**\n * Describes the message livekit.proto.CaptureVideoFrameResponse.\n * Use `create(CaptureVideoFrameResponseSchema)` to create a new message.\n */\nexport const CaptureVideoFrameResponseSchema: GenMessage<CaptureVideoFrameResponse> = /*@__PURE__*/\n messageDesc(file_video_frame, 7);\n\n/**\n * @generated from message livekit.proto.VideoConvertRequest\n */\nexport type VideoConvertRequest = Message<\"livekit.proto.VideoConvertRequest\"> & {\n /**\n * @generated from field: optional bool flip_y = 1;\n */\n flipY: boolean;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2;\n */\n buffer?: VideoBufferInfo;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferType dst_type = 3;\n */\n dstType: VideoBufferType;\n};\n\n/**\n * Describes the message livekit.proto.VideoConvertRequest.\n * Use `create(VideoConvertRequestSchema)` to create a new message.\n */\nexport const VideoConvertRequestSchema: GenMessage<VideoConvertRequest> = /*@__PURE__*/\n messageDesc(file_video_frame, 8);\n\n/**\n * @generated from message livekit.proto.VideoConvertResponse\n */\nexport type VideoConvertResponse = Message<\"livekit.proto.VideoConvertResponse\"> & {\n /**\n * @generated from oneof livekit.proto.VideoConvertResponse.message\n */\n message: {\n /**\n * @generated from field: string error = 1;\n */\n value: string;\n case: \"error\";\n } | {\n /**\n * @generated from field: livekit.proto.OwnedVideoBuffer buffer = 2;\n */\n value: OwnedVideoBuffer;\n case: \"buffer\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message livekit.proto.VideoConvertResponse.\n * Use `create(VideoConvertResponseSchema)` to create a new message.\n */\nexport const VideoConvertResponseSchema: GenMessage<VideoConvertResponse> = /*@__PURE__*/\n messageDesc(file_video_frame, 9);\n\n/**\n * @generated from message livekit.proto.VideoResolution\n */\nexport type VideoResolution = Message<\"livekit.proto.VideoResolution\"> & {\n /**\n * @generated from field: required uint32 width = 1;\n */\n width: number;\n\n /**\n * @generated from field: required uint32 height = 2;\n */\n height: number;\n\n /**\n * @generated from field: required double frame_rate = 3;\n */\n frameRate: number;\n};\n\n/**\n * Describes the message livekit.proto.VideoResolution.\n * Use `create(VideoResolutionSchema)` to create a new message.\n */\nexport const VideoResolutionSchema: GenMessage<VideoResolution> = /*@__PURE__*/\n messageDesc(file_video_frame, 10);\n\n/**\n * @generated from message livekit.proto.VideoBufferInfo\n */\nexport type VideoBufferInfo = Message<\"livekit.proto.VideoBufferInfo\"> & {\n /**\n * @generated from field: required livekit.proto.VideoBufferType type = 1;\n */\n type: VideoBufferType;\n\n /**\n * @generated from field: required uint32 width = 2;\n */\n width: number;\n\n /**\n * @generated from field: required uint32 height = 3;\n */\n height: number;\n\n /**\n * @generated from field: required uint64 data_ptr = 4;\n */\n dataPtr: bigint;\n\n /**\n * only for packed formats\n *\n * @generated from field: required uint32 stride = 6;\n */\n stride: number;\n\n /**\n * @generated from field: repeated livekit.proto.VideoBufferInfo.ComponentInfo components = 7;\n */\n components: VideoBufferInfo_ComponentInfo[];\n};\n\n/**\n * Describes the message livekit.proto.VideoBufferInfo.\n * Use `create(VideoBufferInfoSchema)` to create a new message.\n */\nexport const VideoBufferInfoSchema: GenMessage<VideoBufferInfo> = /*@__PURE__*/\n messageDesc(file_video_frame, 11);\n\n/**\n * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo\n */\nexport type VideoBufferInfo_ComponentInfo = Message<\"livekit.proto.VideoBufferInfo.ComponentInfo\"> & {\n /**\n * @generated from field: required uint64 data_ptr = 1;\n */\n dataPtr: bigint;\n\n /**\n * @generated from field: required uint32 stride = 2;\n */\n stride: number;\n\n /**\n * @generated from field: required uint32 size = 3;\n */\n size: number;\n};\n\n/**\n * Describes the message livekit.proto.VideoBufferInfo.ComponentInfo.\n * Use `create(VideoBufferInfo_ComponentInfoSchema)` to create a new message.\n */\nexport const VideoBufferInfo_ComponentInfoSchema: GenMessage<VideoBufferInfo_ComponentInfo> = /*@__PURE__*/\n messageDesc(file_video_frame, 11, 0);\n\n/**\n * @generated from message livekit.proto.OwnedVideoBuffer\n */\nexport type OwnedVideoBuffer = Message<\"livekit.proto.OwnedVideoBuffer\"> & {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo info = 2;\n */\n info?: VideoBufferInfo;\n};\n\n/**\n * Describes the message livekit.proto.OwnedVideoBuffer.\n * Use `create(OwnedVideoBufferSchema)` to create a new message.\n */\nexport const OwnedVideoBufferSchema: GenMessage<OwnedVideoBuffer> = /*@__PURE__*/\n messageDesc(file_video_frame, 12);\n\n/**\n * @generated from message livekit.proto.VideoStreamInfo\n */\nexport type VideoStreamInfo = Message<\"livekit.proto.VideoStreamInfo\"> & {\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 1;\n */\n type: VideoStreamType;\n};\n\n/**\n * Describes the message livekit.proto.VideoStreamInfo.\n * Use `create(VideoStreamInfoSchema)` to create a new message.\n */\nexport const VideoStreamInfoSchema: GenMessage<VideoStreamInfo> = /*@__PURE__*/\n messageDesc(file_video_frame, 13);\n\n/**\n * @generated from message livekit.proto.OwnedVideoStream\n */\nexport type OwnedVideoStream = Message<\"livekit.proto.OwnedVideoStream\"> & {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamInfo info = 2;\n */\n info?: VideoStreamInfo;\n};\n\n/**\n * Describes the message livekit.proto.OwnedVideoStream.\n * Use `create(OwnedVideoStreamSchema)` to create a new message.\n */\nexport const OwnedVideoStreamSchema: GenMessage<OwnedVideoStream> = /*@__PURE__*/\n messageDesc(file_video_frame, 14);\n\n/**\n * @generated from message livekit.proto.VideoStreamEvent\n */\nexport type VideoStreamEvent = Message<\"livekit.proto.VideoStreamEvent\"> & {\n /**\n * @generated from field: required uint64 stream_handle = 1;\n */\n streamHandle: bigint;\n\n /**\n * @generated from oneof livekit.proto.VideoStreamEvent.message\n */\n message: {\n /**\n * @generated from field: livekit.proto.VideoFrameReceived frame_received = 2;\n */\n value: VideoFrameReceived;\n case: \"frameReceived\";\n } | {\n /**\n * @generated from field: livekit.proto.VideoStreamEOS eos = 3;\n */\n value: VideoStreamEOS;\n case: \"eos\";\n } | { case: undefined; value?: undefined };\n};\n\n/**\n * Describes the message livekit.proto.VideoStreamEvent.\n * Use `create(VideoStreamEventSchema)` to create a new message.\n */\nexport const VideoStreamEventSchema: GenMessage<VideoStreamEvent> = /*@__PURE__*/\n messageDesc(file_video_frame, 15);\n\n/**\n * @generated from message livekit.proto.VideoFrameReceived\n */\nexport type VideoFrameReceived = Message<\"livekit.proto.VideoFrameReceived\"> & {\n /**\n * @generated from field: required livekit.proto.OwnedVideoBuffer buffer = 1;\n */\n buffer?: OwnedVideoBuffer;\n\n /**\n * In microseconds\n *\n * @generated from field: required int64 timestamp_us = 2;\n */\n timestampUs: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoRotation rotation = 3;\n */\n rotation: VideoRotation;\n};\n\n/**\n * Describes the message livekit.proto.VideoFrameReceived.\n * Use `create(VideoFrameReceivedSchema)` to create a new message.\n */\nexport const VideoFrameReceivedSchema: GenMessage<VideoFrameReceived> = /*@__PURE__*/\n messageDesc(file_video_frame, 16);\n\n/**\n * @generated from message livekit.proto.VideoStreamEOS\n */\nexport type VideoStreamEOS = Message<\"livekit.proto.VideoStreamEOS\"> & {\n};\n\n/**\n * Describes the message livekit.proto.VideoStreamEOS.\n * Use `create(VideoStreamEOSSchema)` to create a new message.\n */\nexport const VideoStreamEOSSchema: GenMessage<VideoStreamEOS> = /*@__PURE__*/\n messageDesc(file_video_frame, 17);\n\n/**\n * @generated from message livekit.proto.VideoSourceResolution\n */\nexport type VideoSourceResolution = Message<\"livekit.proto.VideoSourceResolution\"> & {\n /**\n * @generated from field: required uint32 width = 1;\n */\n width: number;\n\n /**\n * @generated from field: required uint32 height = 2;\n */\n height: number;\n};\n\n/**\n * Describes the message livekit.proto.VideoSourceResolution.\n * Use `create(VideoSourceResolutionSchema)` to create a new message.\n */\nexport const VideoSourceResolutionSchema: GenMessage<VideoSourceResolution> = /*@__PURE__*/\n messageDesc(file_video_frame, 18);\n\n/**\n * @generated from message livekit.proto.VideoSourceInfo\n */\nexport type VideoSourceInfo = Message<\"livekit.proto.VideoSourceInfo\"> & {\n /**\n * @generated from field: required livekit.proto.VideoSourceType type = 1;\n */\n type: VideoSourceType;\n};\n\n/**\n * Describes the message livekit.proto.VideoSourceInfo.\n * Use `create(VideoSourceInfoSchema)` to create a new message.\n */\nexport const VideoSourceInfoSchema: GenMessage<VideoSourceInfo> = /*@__PURE__*/\n messageDesc(file_video_frame, 19);\n\n/**\n * @generated from message livekit.proto.OwnedVideoSource\n */\nexport type OwnedVideoSource = Message<\"livekit.proto.OwnedVideoSource\"> & {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoSourceInfo info = 2;\n */\n info?: VideoSourceInfo;\n};\n\n/**\n * Describes the message livekit.proto.OwnedVideoSource.\n * Use `create(OwnedVideoSourceSchema)` to create a new message.\n */\nexport const OwnedVideoSourceSchema: GenMessage<OwnedVideoSource> = /*@__PURE__*/\n messageDesc(file_video_frame, 20);\n\n/**\n * @generated from enum livekit.proto.VideoCodec\n */\nexport enum VideoCodec {\n /**\n * @generated from enum value: VP8 = 0;\n */\n VP8 = 0,\n\n /**\n * @generated from enum value: H264 = 1;\n */\n H264 = 1,\n\n /**\n * @generated from enum value: AV1 = 2;\n */\n AV1 = 2,\n\n /**\n * @generated from enum value: VP9 = 3;\n */\n VP9 = 3,\n}\n\n/**\n * Describes the enum livekit.proto.VideoCodec.\n */\nexport const VideoCodecSchema: GenEnum<VideoCodec> = /*@__PURE__*/\n enumDesc(file_video_frame, 0);\n\n/**\n * @generated from enum livekit.proto.VideoRotation\n */\nexport enum VideoRotation {\n /**\n * @generated from enum value: VIDEO_ROTATION_0 = 0;\n */\n VIDEO_ROTATION_0 = 0,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_90 = 1;\n */\n VIDEO_ROTATION_90 = 1,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_180 = 2;\n */\n VIDEO_ROTATION_180 = 2,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_270 = 3;\n */\n VIDEO_ROTATION_270 = 3,\n}\n\n/**\n * Describes the enum livekit.proto.VideoRotation.\n */\nexport const VideoRotationSchema: GenEnum<VideoRotation> = /*@__PURE__*/\n enumDesc(file_video_frame, 1);\n\n/**\n * @generated from enum livekit.proto.VideoBufferType\n */\nexport enum VideoBufferType {\n /**\n * @generated from enum value: RGBA = 0;\n */\n RGBA = 0,\n\n /**\n * @generated from enum value: ABGR = 1;\n */\n ABGR = 1,\n\n /**\n * @generated from enum value: ARGB = 2;\n */\n ARGB = 2,\n\n /**\n * @generated from enum value: BGRA = 3;\n */\n BGRA = 3,\n\n /**\n * @generated from enum value: RGB24 = 4;\n */\n RGB24 = 4,\n\n /**\n * @generated from enum value: I420 = 5;\n */\n I420 = 5,\n\n /**\n * @generated from enum value: I420A = 6;\n */\n I420A = 6,\n\n /**\n * @generated from enum value: I422 = 7;\n */\n I422 = 7,\n\n /**\n * @generated from enum value: I444 = 8;\n */\n I444 = 8,\n\n /**\n * @generated from enum value: I010 = 9;\n */\n I010 = 9,\n\n /**\n * @generated from enum value: NV12 = 10;\n */\n NV12 = 10,\n}\n\n/**\n * Describes the enum livekit.proto.VideoBufferType.\n */\nexport const VideoBufferTypeSchema: GenEnum<VideoBufferType> = /*@__PURE__*/\n enumDesc(file_video_frame, 2);\n\n/**\n * @generated from enum livekit.proto.VideoStreamType\n */\nexport enum VideoStreamType {\n /**\n * @generated from enum value: VIDEO_STREAM_NATIVE = 0;\n */\n VIDEO_STREAM_NATIVE = 0,\n\n /**\n * @generated from enum value: VIDEO_STREAM_WEBGL = 1;\n */\n VIDEO_STREAM_WEBGL = 1,\n\n /**\n * @generated from enum value: VIDEO_STREAM_HTML = 2;\n */\n VIDEO_STREAM_HTML = 2,\n}\n\n/**\n * Describes the enum livekit.proto.VideoStreamType.\n */\nexport const VideoStreamTypeSchema: GenEnum<VideoStreamType> = /*@__PURE__*/\n enumDesc(file_video_frame, 3);\n\n/**\n * @generated from enum livekit.proto.VideoSourceType\n */\nexport enum VideoSourceType {\n /**\n * @generated from enum value: VIDEO_SOURCE_NATIVE = 0;\n */\n VIDEO_SOURCE_NATIVE = 0,\n}\n\n/**\n * Describes the enum livekit.proto.VideoSourceType.\n */\nexport const VideoSourceTypeSchema: GenEnum<VideoSourceType> = /*@__PURE__*/\n enumDesc(file_video_frame, 4);\n\n"],"mappings":"AAmBA,SAAS,UAAU,UAAU,mBAAmB;AAEhD,SAAS,mBAAmB;AAE5B,SAAS,kBAAkB;AAMpB,MAAM,mBACX,yBAAS,svHAAsvH,CAAC,aAAa,UAAU,CAAC;AAsCnxH,MAAM,8BACX,4BAAY,kBAAkB,CAAC;AAgB1B,MAAM,+BACX,4BAAY,kBAAkB,CAAC;AAsC1B,MAAM,0CACX,4BAAY,kBAAkB,CAAC;AAgB1B,MAAM,2CACX,4BAAY,kBAAkB,CAAC;AA2B1B,MAAM,8BACX,4BAAY,kBAAkB,CAAC;AAgB1B,MAAM,+BACX,4BAAY,kBAAkB,CAAC;AAmC1B,MAAM,iCACX,4BAAY,kBAAkB,CAAC;AAY1B,MAAM,kCACX,4BAAY,kBAAkB,CAAC;AA0B1B,MAAM,4BACX,4BAAY,kBAAkB,CAAC;AA4B1B,MAAM,6BACX,4BAAY,kBAAkB,CAAC;AA0B1B,MAAM,wB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AR;AAKA,EAAAA,kCAAA,UAAO,KAAP;AAKA,EAAAA,kCAAA,UAAO,KAAP;AAKA,EAAAA,kCAAA,UAAO,KAAP;AAKA,EAAAA,kCAAA,UAAO,MAAP;AAtDU,SAAAA;AAAA,GAAA;AA4DL,MAAM,wBACX,yBAAS,kBAAkB,CAAC;AAKvB,IAAK,kBAAL,kBAAKC,qBAAL;AAIL,EAAAA,kCAAA,yBAAsB,KAAtB;AAKA,EAAAA,kCAAA,wBAAqB,KAArB;AAKA,EAAAA,kCAAA,uBAAoB,KAApB;AAdU,SAAAA;AAAA,GAAA;AAoBL,MAAM,wBACX,yBAAS,kBAAkB,CAAC;AAKvB,IAAK,kBAAL,kBAAKC,qBAAL;AAIL,EAAAA,kCAAA,yBAAsB,KAAtB;AAJU,SAAAA;AAAA,GAAA;AAUL,MAAM,wBACX,yBAAS,kBAAkB,CAAC;","names":["VideoCodec","VideoRotation","VideoBufferType","VideoStreamType","VideoSourceType"]}
1
+ {"version":3,"sources":["../../src/proto/video_frame_pb.ts"],"sourcesContent":["// Copyright 2023 LiveKit, Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// @generated by protoc-gen-es v1.10.0 with parameter \"target=ts,import_extension=.js\"\n// @generated from file video_frame.proto (package livekit.proto, syntax proto2)\n/* eslint-disable */\n// @ts-nocheck\n\nimport type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from \"@bufbuild/protobuf\";\nimport { Message, proto2 } from \"@bufbuild/protobuf\";\nimport { TrackSource } from \"./track_pb.js\";\nimport { FfiOwnedHandle } from \"./handle_pb.js\";\n\n/**\n * @generated from enum livekit.proto.VideoCodec\n */\nexport enum VideoCodec {\n /**\n * @generated from enum value: VP8 = 0;\n */\n VP8 = 0,\n\n /**\n * @generated from enum value: H264 = 1;\n */\n H264 = 1,\n\n /**\n * @generated from enum value: AV1 = 2;\n */\n AV1 = 2,\n\n /**\n * @generated from enum value: VP9 = 3;\n */\n VP9 = 3,\n}\n// Retrieve enum metadata with: proto2.getEnumType(VideoCodec)\nproto2.util.setEnumType(VideoCodec, \"livekit.proto.VideoCodec\", [\n { no: 0, name: \"VP8\" },\n { no: 1, name: \"H264\" },\n { no: 2, name: \"AV1\" },\n { no: 3, name: \"VP9\" },\n]);\n\n/**\n * @generated from enum livekit.proto.VideoRotation\n */\nexport enum VideoRotation {\n /**\n * @generated from enum value: VIDEO_ROTATION_0 = 0;\n */\n VIDEO_ROTATION_0 = 0,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_90 = 1;\n */\n VIDEO_ROTATION_90 = 1,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_180 = 2;\n */\n VIDEO_ROTATION_180 = 2,\n\n /**\n * @generated from enum value: VIDEO_ROTATION_270 = 3;\n */\n VIDEO_ROTATION_270 = 3,\n}\n// Retrieve enum metadata with: proto2.getEnumType(VideoRotation)\nproto2.util.setEnumType(VideoRotation, \"livekit.proto.VideoRotation\", [\n { no: 0, name: \"VIDEO_ROTATION_0\" },\n { no: 1, name: \"VIDEO_ROTATION_90\" },\n { no: 2, name: \"VIDEO_ROTATION_180\" },\n { no: 3, name: \"VIDEO_ROTATION_270\" },\n]);\n\n/**\n * @generated from enum livekit.proto.VideoBufferType\n */\nexport enum VideoBufferType {\n /**\n * @generated from enum value: RGBA = 0;\n */\n RGBA = 0,\n\n /**\n * @generated from enum value: ABGR = 1;\n */\n ABGR = 1,\n\n /**\n * @generated from enum value: ARGB = 2;\n */\n ARGB = 2,\n\n /**\n * @generated from enum value: BGRA = 3;\n */\n BGRA = 3,\n\n /**\n * @generated from enum value: RGB24 = 4;\n */\n RGB24 = 4,\n\n /**\n * @generated from enum value: I420 = 5;\n */\n I420 = 5,\n\n /**\n * @generated from enum value: I420A = 6;\n */\n I420A = 6,\n\n /**\n * @generated from enum value: I422 = 7;\n */\n I422 = 7,\n\n /**\n * @generated from enum value: I444 = 8;\n */\n I444 = 8,\n\n /**\n * @generated from enum value: I010 = 9;\n */\n I010 = 9,\n\n /**\n * @generated from enum value: NV12 = 10;\n */\n NV12 = 10,\n}\n// Retrieve enum metadata with: proto2.getEnumType(VideoBufferType)\nproto2.util.setEnumType(VideoBufferType, \"livekit.proto.VideoBufferType\", [\n { no: 0, name: \"RGBA\" },\n { no: 1, name: \"ABGR\" },\n { no: 2, name: \"ARGB\" },\n { no: 3, name: \"BGRA\" },\n { no: 4, name: \"RGB24\" },\n { no: 5, name: \"I420\" },\n { no: 6, name: \"I420A\" },\n { no: 7, name: \"I422\" },\n { no: 8, name: \"I444\" },\n { no: 9, name: \"I010\" },\n { no: 10, name: \"NV12\" },\n]);\n\n/**\n * @generated from enum livekit.proto.VideoStreamType\n */\nexport enum VideoStreamType {\n /**\n * @generated from enum value: VIDEO_STREAM_NATIVE = 0;\n */\n VIDEO_STREAM_NATIVE = 0,\n\n /**\n * @generated from enum value: VIDEO_STREAM_WEBGL = 1;\n */\n VIDEO_STREAM_WEBGL = 1,\n\n /**\n * @generated from enum value: VIDEO_STREAM_HTML = 2;\n */\n VIDEO_STREAM_HTML = 2,\n}\n// Retrieve enum metadata with: proto2.getEnumType(VideoStreamType)\nproto2.util.setEnumType(VideoStreamType, \"livekit.proto.VideoStreamType\", [\n { no: 0, name: \"VIDEO_STREAM_NATIVE\" },\n { no: 1, name: \"VIDEO_STREAM_WEBGL\" },\n { no: 2, name: \"VIDEO_STREAM_HTML\" },\n]);\n\n/**\n * @generated from enum livekit.proto.VideoSourceType\n */\nexport enum VideoSourceType {\n /**\n * @generated from enum value: VIDEO_SOURCE_NATIVE = 0;\n */\n VIDEO_SOURCE_NATIVE = 0,\n}\n// Retrieve enum metadata with: proto2.getEnumType(VideoSourceType)\nproto2.util.setEnumType(VideoSourceType, \"livekit.proto.VideoSourceType\", [\n { no: 0, name: \"VIDEO_SOURCE_NATIVE\" },\n]);\n\n/**\n * Create a new VideoStream\n * VideoStream is used to receive video frames from a track\n *\n * @generated from message livekit.proto.NewVideoStreamRequest\n */\nexport class NewVideoStreamRequest extends Message<NewVideoStreamRequest> {\n /**\n * @generated from field: required uint64 track_handle = 1;\n */\n trackHandle?: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 2;\n */\n type?: VideoStreamType;\n\n /**\n * Get the frame on a specific format\n *\n * @generated from field: optional livekit.proto.VideoBufferType format = 3;\n */\n format?: VideoBufferType;\n\n /**\n * if true, stride will be set to width/chroma_width\n *\n * @generated from field: optional bool normalize_stride = 4;\n */\n normalizeStride?: boolean;\n\n constructor(data?: PartialMessage<NewVideoStreamRequest>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.NewVideoStreamRequest\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"track_handle\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 2, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoStreamType), req: true },\n { no: 3, name: \"format\", kind: \"enum\", T: proto2.getEnumType(VideoBufferType), opt: true },\n { no: 4, name: \"normalize_stride\", kind: \"scalar\", T: 8 /* ScalarType.BOOL */, opt: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewVideoStreamRequest {\n return new NewVideoStreamRequest().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewVideoStreamRequest {\n return new NewVideoStreamRequest().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewVideoStreamRequest {\n return new NewVideoStreamRequest().fromJsonString(jsonString, options);\n }\n\n static equals(a: NewVideoStreamRequest | PlainMessage<NewVideoStreamRequest> | undefined, b: NewVideoStreamRequest | PlainMessage<NewVideoStreamRequest> | undefined): boolean {\n return proto2.util.equals(NewVideoStreamRequest, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.NewVideoStreamResponse\n */\nexport class NewVideoStreamResponse extends Message<NewVideoStreamResponse> {\n /**\n * @generated from field: required livekit.proto.OwnedVideoStream stream = 1;\n */\n stream?: OwnedVideoStream;\n\n constructor(data?: PartialMessage<NewVideoStreamResponse>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.NewVideoStreamResponse\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"stream\", kind: \"message\", T: OwnedVideoStream, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewVideoStreamResponse {\n return new NewVideoStreamResponse().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewVideoStreamResponse {\n return new NewVideoStreamResponse().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewVideoStreamResponse {\n return new NewVideoStreamResponse().fromJsonString(jsonString, options);\n }\n\n static equals(a: NewVideoStreamResponse | PlainMessage<NewVideoStreamResponse> | undefined, b: NewVideoStreamResponse | PlainMessage<NewVideoStreamResponse> | undefined): boolean {\n return proto2.util.equals(NewVideoStreamResponse, a, b);\n }\n}\n\n/**\n * Request a video stream from a participant\n *\n * @generated from message livekit.proto.VideoStreamFromParticipantRequest\n */\nexport class VideoStreamFromParticipantRequest extends Message<VideoStreamFromParticipantRequest> {\n /**\n * @generated from field: required uint64 participant_handle = 1;\n */\n participantHandle?: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 2;\n */\n type?: VideoStreamType;\n\n /**\n * @generated from field: required livekit.proto.TrackSource track_source = 3;\n */\n trackSource?: TrackSource;\n\n /**\n * @generated from field: optional livekit.proto.VideoBufferType format = 4;\n */\n format?: VideoBufferType;\n\n /**\n * @generated from field: optional bool normalize_stride = 5;\n */\n normalizeStride?: boolean;\n\n constructor(data?: PartialMessage<VideoStreamFromParticipantRequest>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoStreamFromParticipantRequest\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"participant_handle\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 2, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoStreamType), req: true },\n { no: 3, name: \"track_source\", kind: \"enum\", T: proto2.getEnumType(TrackSource), req: true },\n { no: 4, name: \"format\", kind: \"enum\", T: proto2.getEnumType(VideoBufferType), opt: true },\n { no: 5, name: \"normalize_stride\", kind: \"scalar\", T: 8 /* ScalarType.BOOL */, opt: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoStreamFromParticipantRequest {\n return new VideoStreamFromParticipantRequest().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoStreamFromParticipantRequest {\n return new VideoStreamFromParticipantRequest().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoStreamFromParticipantRequest {\n return new VideoStreamFromParticipantRequest().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoStreamFromParticipantRequest | PlainMessage<VideoStreamFromParticipantRequest> | undefined, b: VideoStreamFromParticipantRequest | PlainMessage<VideoStreamFromParticipantRequest> | undefined): boolean {\n return proto2.util.equals(VideoStreamFromParticipantRequest, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoStreamFromParticipantResponse\n */\nexport class VideoStreamFromParticipantResponse extends Message<VideoStreamFromParticipantResponse> {\n /**\n * @generated from field: required livekit.proto.OwnedVideoStream stream = 1;\n */\n stream?: OwnedVideoStream;\n\n constructor(data?: PartialMessage<VideoStreamFromParticipantResponse>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoStreamFromParticipantResponse\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"stream\", kind: \"message\", T: OwnedVideoStream, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoStreamFromParticipantResponse {\n return new VideoStreamFromParticipantResponse().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoStreamFromParticipantResponse {\n return new VideoStreamFromParticipantResponse().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoStreamFromParticipantResponse {\n return new VideoStreamFromParticipantResponse().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoStreamFromParticipantResponse | PlainMessage<VideoStreamFromParticipantResponse> | undefined, b: VideoStreamFromParticipantResponse | PlainMessage<VideoStreamFromParticipantResponse> | undefined): boolean {\n return proto2.util.equals(VideoStreamFromParticipantResponse, a, b);\n }\n}\n\n/**\n * Create a new VideoSource\n * VideoSource is used to send video frame to a track\n *\n * @generated from message livekit.proto.NewVideoSourceRequest\n */\nexport class NewVideoSourceRequest extends Message<NewVideoSourceRequest> {\n /**\n * @generated from field: required livekit.proto.VideoSourceType type = 1;\n */\n type?: VideoSourceType;\n\n /**\n * Used to determine which encodings to use + simulcast layers\n * Most of the time it corresponds to the source resolution \n *\n * @generated from field: required livekit.proto.VideoSourceResolution resolution = 2;\n */\n resolution?: VideoSourceResolution;\n\n constructor(data?: PartialMessage<NewVideoSourceRequest>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.NewVideoSourceRequest\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoSourceType), req: true },\n { no: 2, name: \"resolution\", kind: \"message\", T: VideoSourceResolution, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewVideoSourceRequest {\n return new NewVideoSourceRequest().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewVideoSourceRequest {\n return new NewVideoSourceRequest().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewVideoSourceRequest {\n return new NewVideoSourceRequest().fromJsonString(jsonString, options);\n }\n\n static equals(a: NewVideoSourceRequest | PlainMessage<NewVideoSourceRequest> | undefined, b: NewVideoSourceRequest | PlainMessage<NewVideoSourceRequest> | undefined): boolean {\n return proto2.util.equals(NewVideoSourceRequest, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.NewVideoSourceResponse\n */\nexport class NewVideoSourceResponse extends Message<NewVideoSourceResponse> {\n /**\n * @generated from field: required livekit.proto.OwnedVideoSource source = 1;\n */\n source?: OwnedVideoSource;\n\n constructor(data?: PartialMessage<NewVideoSourceResponse>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.NewVideoSourceResponse\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"source\", kind: \"message\", T: OwnedVideoSource, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewVideoSourceResponse {\n return new NewVideoSourceResponse().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewVideoSourceResponse {\n return new NewVideoSourceResponse().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewVideoSourceResponse {\n return new NewVideoSourceResponse().fromJsonString(jsonString, options);\n }\n\n static equals(a: NewVideoSourceResponse | PlainMessage<NewVideoSourceResponse> | undefined, b: NewVideoSourceResponse | PlainMessage<NewVideoSourceResponse> | undefined): boolean {\n return proto2.util.equals(NewVideoSourceResponse, a, b);\n }\n}\n\n/**\n * Push a frame to a VideoSource\n *\n * @generated from message livekit.proto.CaptureVideoFrameRequest\n */\nexport class CaptureVideoFrameRequest extends Message<CaptureVideoFrameRequest> {\n /**\n * @generated from field: required uint64 source_handle = 1;\n */\n sourceHandle?: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2;\n */\n buffer?: VideoBufferInfo;\n\n /**\n * In microseconds\n *\n * @generated from field: required int64 timestamp_us = 3;\n */\n timestampUs?: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoRotation rotation = 4;\n */\n rotation?: VideoRotation;\n\n constructor(data?: PartialMessage<CaptureVideoFrameRequest>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.CaptureVideoFrameRequest\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"source_handle\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 2, name: \"buffer\", kind: \"message\", T: VideoBufferInfo, req: true },\n { no: 3, name: \"timestamp_us\", kind: \"scalar\", T: 3 /* ScalarType.INT64 */, req: true },\n { no: 4, name: \"rotation\", kind: \"enum\", T: proto2.getEnumType(VideoRotation), req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CaptureVideoFrameRequest {\n return new CaptureVideoFrameRequest().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CaptureVideoFrameRequest {\n return new CaptureVideoFrameRequest().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CaptureVideoFrameRequest {\n return new CaptureVideoFrameRequest().fromJsonString(jsonString, options);\n }\n\n static equals(a: CaptureVideoFrameRequest | PlainMessage<CaptureVideoFrameRequest> | undefined, b: CaptureVideoFrameRequest | PlainMessage<CaptureVideoFrameRequest> | undefined): boolean {\n return proto2.util.equals(CaptureVideoFrameRequest, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.CaptureVideoFrameResponse\n */\nexport class CaptureVideoFrameResponse extends Message<CaptureVideoFrameResponse> {\n constructor(data?: PartialMessage<CaptureVideoFrameResponse>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.CaptureVideoFrameResponse\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CaptureVideoFrameResponse {\n return new CaptureVideoFrameResponse().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CaptureVideoFrameResponse {\n return new CaptureVideoFrameResponse().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CaptureVideoFrameResponse {\n return new CaptureVideoFrameResponse().fromJsonString(jsonString, options);\n }\n\n static equals(a: CaptureVideoFrameResponse | PlainMessage<CaptureVideoFrameResponse> | undefined, b: CaptureVideoFrameResponse | PlainMessage<CaptureVideoFrameResponse> | undefined): boolean {\n return proto2.util.equals(CaptureVideoFrameResponse, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoConvertRequest\n */\nexport class VideoConvertRequest extends Message<VideoConvertRequest> {\n /**\n * @generated from field: optional bool flip_y = 1;\n */\n flipY?: boolean;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo buffer = 2;\n */\n buffer?: VideoBufferInfo;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferType dst_type = 3;\n */\n dstType?: VideoBufferType;\n\n constructor(data?: PartialMessage<VideoConvertRequest>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoConvertRequest\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"flip_y\", kind: \"scalar\", T: 8 /* ScalarType.BOOL */, opt: true },\n { no: 2, name: \"buffer\", kind: \"message\", T: VideoBufferInfo, req: true },\n { no: 3, name: \"dst_type\", kind: \"enum\", T: proto2.getEnumType(VideoBufferType), req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoConvertRequest {\n return new VideoConvertRequest().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoConvertRequest {\n return new VideoConvertRequest().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoConvertRequest {\n return new VideoConvertRequest().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoConvertRequest | PlainMessage<VideoConvertRequest> | undefined, b: VideoConvertRequest | PlainMessage<VideoConvertRequest> | undefined): boolean {\n return proto2.util.equals(VideoConvertRequest, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoConvertResponse\n */\nexport class VideoConvertResponse extends Message<VideoConvertResponse> {\n /**\n * @generated from oneof livekit.proto.VideoConvertResponse.message\n */\n message: {\n /**\n * @generated from field: string error = 1;\n */\n value: string;\n case: \"error\";\n } | {\n /**\n * @generated from field: livekit.proto.OwnedVideoBuffer buffer = 2;\n */\n value: OwnedVideoBuffer;\n case: \"buffer\";\n } | { case: undefined; value?: undefined } = { case: undefined };\n\n constructor(data?: PartialMessage<VideoConvertResponse>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoConvertResponse\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"error\", kind: \"scalar\", T: 9 /* ScalarType.STRING */, oneof: \"message\" },\n { no: 2, name: \"buffer\", kind: \"message\", T: OwnedVideoBuffer, oneof: \"message\" },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoConvertResponse {\n return new VideoConvertResponse().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoConvertResponse {\n return new VideoConvertResponse().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoConvertResponse {\n return new VideoConvertResponse().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoConvertResponse | PlainMessage<VideoConvertResponse> | undefined, b: VideoConvertResponse | PlainMessage<VideoConvertResponse> | undefined): boolean {\n return proto2.util.equals(VideoConvertResponse, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoResolution\n */\nexport class VideoResolution extends Message<VideoResolution> {\n /**\n * @generated from field: required uint32 width = 1;\n */\n width?: number;\n\n /**\n * @generated from field: required uint32 height = 2;\n */\n height?: number;\n\n /**\n * @generated from field: required double frame_rate = 3;\n */\n frameRate?: number;\n\n constructor(data?: PartialMessage<VideoResolution>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoResolution\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"width\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 2, name: \"height\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 3, name: \"frame_rate\", kind: \"scalar\", T: 1 /* ScalarType.DOUBLE */, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoResolution {\n return new VideoResolution().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoResolution {\n return new VideoResolution().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoResolution {\n return new VideoResolution().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoResolution | PlainMessage<VideoResolution> | undefined, b: VideoResolution | PlainMessage<VideoResolution> | undefined): boolean {\n return proto2.util.equals(VideoResolution, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoBufferInfo\n */\nexport class VideoBufferInfo extends Message<VideoBufferInfo> {\n /**\n * @generated from field: required livekit.proto.VideoBufferType type = 1;\n */\n type?: VideoBufferType;\n\n /**\n * @generated from field: required uint32 width = 2;\n */\n width?: number;\n\n /**\n * @generated from field: required uint32 height = 3;\n */\n height?: number;\n\n /**\n * @generated from field: required uint64 data_ptr = 4;\n */\n dataPtr?: bigint;\n\n /**\n * only for packed formats\n *\n * @generated from field: required uint32 stride = 6;\n */\n stride?: number;\n\n /**\n * @generated from field: repeated livekit.proto.VideoBufferInfo.ComponentInfo components = 7;\n */\n components: VideoBufferInfo_ComponentInfo[] = [];\n\n constructor(data?: PartialMessage<VideoBufferInfo>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoBufferInfo\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoBufferType), req: true },\n { no: 2, name: \"width\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 3, name: \"height\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 4, name: \"data_ptr\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 6, name: \"stride\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 7, name: \"components\", kind: \"message\", T: VideoBufferInfo_ComponentInfo, repeated: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoBufferInfo {\n return new VideoBufferInfo().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoBufferInfo {\n return new VideoBufferInfo().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoBufferInfo {\n return new VideoBufferInfo().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoBufferInfo | PlainMessage<VideoBufferInfo> | undefined, b: VideoBufferInfo | PlainMessage<VideoBufferInfo> | undefined): boolean {\n return proto2.util.equals(VideoBufferInfo, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoBufferInfo.ComponentInfo\n */\nexport class VideoBufferInfo_ComponentInfo extends Message<VideoBufferInfo_ComponentInfo> {\n /**\n * @generated from field: required uint64 data_ptr = 1;\n */\n dataPtr?: bigint;\n\n /**\n * @generated from field: required uint32 stride = 2;\n */\n stride?: number;\n\n /**\n * @generated from field: required uint32 size = 3;\n */\n size?: number;\n\n constructor(data?: PartialMessage<VideoBufferInfo_ComponentInfo>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoBufferInfo.ComponentInfo\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"data_ptr\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 2, name: \"stride\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 3, name: \"size\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoBufferInfo_ComponentInfo {\n return new VideoBufferInfo_ComponentInfo().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoBufferInfo_ComponentInfo {\n return new VideoBufferInfo_ComponentInfo().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoBufferInfo_ComponentInfo {\n return new VideoBufferInfo_ComponentInfo().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoBufferInfo_ComponentInfo | PlainMessage<VideoBufferInfo_ComponentInfo> | undefined, b: VideoBufferInfo_ComponentInfo | PlainMessage<VideoBufferInfo_ComponentInfo> | undefined): boolean {\n return proto2.util.equals(VideoBufferInfo_ComponentInfo, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.OwnedVideoBuffer\n */\nexport class OwnedVideoBuffer extends Message<OwnedVideoBuffer> {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoBufferInfo info = 2;\n */\n info?: VideoBufferInfo;\n\n constructor(data?: PartialMessage<OwnedVideoBuffer>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.OwnedVideoBuffer\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"handle\", kind: \"message\", T: FfiOwnedHandle, req: true },\n { no: 2, name: \"info\", kind: \"message\", T: VideoBufferInfo, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedVideoBuffer {\n return new OwnedVideoBuffer().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedVideoBuffer {\n return new OwnedVideoBuffer().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedVideoBuffer {\n return new OwnedVideoBuffer().fromJsonString(jsonString, options);\n }\n\n static equals(a: OwnedVideoBuffer | PlainMessage<OwnedVideoBuffer> | undefined, b: OwnedVideoBuffer | PlainMessage<OwnedVideoBuffer> | undefined): boolean {\n return proto2.util.equals(OwnedVideoBuffer, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoStreamInfo\n */\nexport class VideoStreamInfo extends Message<VideoStreamInfo> {\n /**\n * @generated from field: required livekit.proto.VideoStreamType type = 1;\n */\n type?: VideoStreamType;\n\n constructor(data?: PartialMessage<VideoStreamInfo>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoStreamInfo\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoStreamType), req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoStreamInfo {\n return new VideoStreamInfo().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoStreamInfo {\n return new VideoStreamInfo().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoStreamInfo {\n return new VideoStreamInfo().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoStreamInfo | PlainMessage<VideoStreamInfo> | undefined, b: VideoStreamInfo | PlainMessage<VideoStreamInfo> | undefined): boolean {\n return proto2.util.equals(VideoStreamInfo, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.OwnedVideoStream\n */\nexport class OwnedVideoStream extends Message<OwnedVideoStream> {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoStreamInfo info = 2;\n */\n info?: VideoStreamInfo;\n\n constructor(data?: PartialMessage<OwnedVideoStream>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.OwnedVideoStream\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"handle\", kind: \"message\", T: FfiOwnedHandle, req: true },\n { no: 2, name: \"info\", kind: \"message\", T: VideoStreamInfo, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedVideoStream {\n return new OwnedVideoStream().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedVideoStream {\n return new OwnedVideoStream().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedVideoStream {\n return new OwnedVideoStream().fromJsonString(jsonString, options);\n }\n\n static equals(a: OwnedVideoStream | PlainMessage<OwnedVideoStream> | undefined, b: OwnedVideoStream | PlainMessage<OwnedVideoStream> | undefined): boolean {\n return proto2.util.equals(OwnedVideoStream, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoStreamEvent\n */\nexport class VideoStreamEvent extends Message<VideoStreamEvent> {\n /**\n * @generated from field: required uint64 stream_handle = 1;\n */\n streamHandle?: bigint;\n\n /**\n * @generated from oneof livekit.proto.VideoStreamEvent.message\n */\n message: {\n /**\n * @generated from field: livekit.proto.VideoFrameReceived frame_received = 2;\n */\n value: VideoFrameReceived;\n case: \"frameReceived\";\n } | {\n /**\n * @generated from field: livekit.proto.VideoStreamEOS eos = 3;\n */\n value: VideoStreamEOS;\n case: \"eos\";\n } | { case: undefined; value?: undefined } = { case: undefined };\n\n constructor(data?: PartialMessage<VideoStreamEvent>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoStreamEvent\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"stream_handle\", kind: \"scalar\", T: 4 /* ScalarType.UINT64 */, req: true },\n { no: 2, name: \"frame_received\", kind: \"message\", T: VideoFrameReceived, oneof: \"message\" },\n { no: 3, name: \"eos\", kind: \"message\", T: VideoStreamEOS, oneof: \"message\" },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoStreamEvent {\n return new VideoStreamEvent().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoStreamEvent {\n return new VideoStreamEvent().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoStreamEvent {\n return new VideoStreamEvent().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoStreamEvent | PlainMessage<VideoStreamEvent> | undefined, b: VideoStreamEvent | PlainMessage<VideoStreamEvent> | undefined): boolean {\n return proto2.util.equals(VideoStreamEvent, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoFrameReceived\n */\nexport class VideoFrameReceived extends Message<VideoFrameReceived> {\n /**\n * @generated from field: required livekit.proto.OwnedVideoBuffer buffer = 1;\n */\n buffer?: OwnedVideoBuffer;\n\n /**\n * In microseconds\n *\n * @generated from field: required int64 timestamp_us = 2;\n */\n timestampUs?: bigint;\n\n /**\n * @generated from field: required livekit.proto.VideoRotation rotation = 3;\n */\n rotation?: VideoRotation;\n\n constructor(data?: PartialMessage<VideoFrameReceived>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoFrameReceived\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"buffer\", kind: \"message\", T: OwnedVideoBuffer, req: true },\n { no: 2, name: \"timestamp_us\", kind: \"scalar\", T: 3 /* ScalarType.INT64 */, req: true },\n { no: 3, name: \"rotation\", kind: \"enum\", T: proto2.getEnumType(VideoRotation), req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoFrameReceived {\n return new VideoFrameReceived().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoFrameReceived {\n return new VideoFrameReceived().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoFrameReceived {\n return new VideoFrameReceived().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoFrameReceived | PlainMessage<VideoFrameReceived> | undefined, b: VideoFrameReceived | PlainMessage<VideoFrameReceived> | undefined): boolean {\n return proto2.util.equals(VideoFrameReceived, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoStreamEOS\n */\nexport class VideoStreamEOS extends Message<VideoStreamEOS> {\n constructor(data?: PartialMessage<VideoStreamEOS>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoStreamEOS\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoStreamEOS {\n return new VideoStreamEOS().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoStreamEOS {\n return new VideoStreamEOS().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoStreamEOS {\n return new VideoStreamEOS().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoStreamEOS | PlainMessage<VideoStreamEOS> | undefined, b: VideoStreamEOS | PlainMessage<VideoStreamEOS> | undefined): boolean {\n return proto2.util.equals(VideoStreamEOS, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoSourceResolution\n */\nexport class VideoSourceResolution extends Message<VideoSourceResolution> {\n /**\n * @generated from field: required uint32 width = 1;\n */\n width?: number;\n\n /**\n * @generated from field: required uint32 height = 2;\n */\n height?: number;\n\n constructor(data?: PartialMessage<VideoSourceResolution>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoSourceResolution\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"width\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n { no: 2, name: \"height\", kind: \"scalar\", T: 13 /* ScalarType.UINT32 */, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoSourceResolution {\n return new VideoSourceResolution().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoSourceResolution {\n return new VideoSourceResolution().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoSourceResolution {\n return new VideoSourceResolution().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoSourceResolution | PlainMessage<VideoSourceResolution> | undefined, b: VideoSourceResolution | PlainMessage<VideoSourceResolution> | undefined): boolean {\n return proto2.util.equals(VideoSourceResolution, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.VideoSourceInfo\n */\nexport class VideoSourceInfo extends Message<VideoSourceInfo> {\n /**\n * @generated from field: required livekit.proto.VideoSourceType type = 1;\n */\n type?: VideoSourceType;\n\n constructor(data?: PartialMessage<VideoSourceInfo>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.VideoSourceInfo\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"type\", kind: \"enum\", T: proto2.getEnumType(VideoSourceType), req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VideoSourceInfo {\n return new VideoSourceInfo().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VideoSourceInfo {\n return new VideoSourceInfo().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VideoSourceInfo {\n return new VideoSourceInfo().fromJsonString(jsonString, options);\n }\n\n static equals(a: VideoSourceInfo | PlainMessage<VideoSourceInfo> | undefined, b: VideoSourceInfo | PlainMessage<VideoSourceInfo> | undefined): boolean {\n return proto2.util.equals(VideoSourceInfo, a, b);\n }\n}\n\n/**\n * @generated from message livekit.proto.OwnedVideoSource\n */\nexport class OwnedVideoSource extends Message<OwnedVideoSource> {\n /**\n * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;\n */\n handle?: FfiOwnedHandle;\n\n /**\n * @generated from field: required livekit.proto.VideoSourceInfo info = 2;\n */\n info?: VideoSourceInfo;\n\n constructor(data?: PartialMessage<OwnedVideoSource>) {\n super();\n proto2.util.initPartial(data, this);\n }\n\n static readonly runtime: typeof proto2 = proto2;\n static readonly typeName = \"livekit.proto.OwnedVideoSource\";\n static readonly fields: FieldList = proto2.util.newFieldList(() => [\n { no: 1, name: \"handle\", kind: \"message\", T: FfiOwnedHandle, req: true },\n { no: 2, name: \"info\", kind: \"message\", T: VideoSourceInfo, req: true },\n ]);\n\n static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedVideoSource {\n return new OwnedVideoSource().fromBinary(bytes, options);\n }\n\n static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedVideoSource {\n return new OwnedVideoSource().fromJson(jsonValue, options);\n }\n\n static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedVideoSource {\n return new OwnedVideoSource().fromJsonString(jsonString, options);\n }\n\n static equals(a: OwnedVideoSource | PlainMessage<OwnedVideoSource> | undefined, b: OwnedVideoSource | PlainMessage<OwnedVideoSource> | undefined): boolean {\n return proto2.util.equals(OwnedVideoSource, a, b);\n }\n}\n\n"],"mappings":"AAoBA,SAAS,SAAS,cAAc;AAChC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAKxB,IAAK,aAAL,kBAAKA,gBAAL;AAIL,EAAAA,wBAAA,SAAM,KAAN;AAKA,EAAAA,wBAAA,UAAO,KAAP;AAKA,EAAAA,wBAAA,SAAM,KAAN;AAKA,EAAAA,wBAAA,SAAM,KAAN;AAnBU,SAAAA;AAAA,GAAA;AAsBZ,OAAO,KAAK,YAAY,YAAY,4BAA4B;AAAA,EAC9D,EAAE,IAAI,GAAG,MAAM,MAAM;AAAA,EACrB,EAAE,IAAI,GAAG,MAAM,OAAO;AAAA,E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E,IAAI,GAAG,MAAM,UAAU,MAAM,WAAW,GAAG,gBAAgB,KAAK,KAAK;AAAA,EACvE,EAAE,IAAI,GAAG,MAAM,QAAQ,MAAM,WAAW,GAAG,iBAAiB,KAAK,KAAK;AACxE,CAAC;AArBI,IAAM,mBAAN;","names":["VideoCodec","VideoRotation","VideoBufferType","VideoStreamType","VideoSourceType"]}
package/dist/room.cjs CHANGED
@@ -35,51 +35,37 @@ __export(room_exports, {
35
35
  defaultRtcConfiguration: () => defaultRtcConfiguration
36
36
  });
37
37
  module.exports = __toCommonJS(room_exports);
38
- var import_protobuf = require("@bufbuild/protobuf");
39
38
  var import_events = __toESM(require("events"), 1);
40
39
  var import_e2ee = require("./e2ee.cjs");
41
40
  var import_ffi_client = require("./ffi_client.cjs");
42
41
  var import_participant = require("./participant.cjs");
43
42
  var import_e2ee_pb = require("./proto/e2ee_pb.cjs");
44
43
  var import_room_pb = require("./proto/room_pb.cjs");
44
+ var import_room_pb2 = require("./proto/room_pb.cjs");
45
45
  var import_track_pb = require("./proto/track_pb.cjs");
46
46
  var import_track = require("./track.cjs");
47
47
  var import_track_publication = require("./track_publication.cjs");
48
48
  const defaultRtcConfiguration = {
49
- iceTransportType: import_room_pb.IceTransportType.TRANSPORT_ALL,
50
- continualGatheringPolicy: import_room_pb.ContinualGatheringPolicy.GATHER_CONTINUALLY,
49
+ iceTransportType: import_room_pb2.IceTransportType.TRANSPORT_ALL,
50
+ continualGatheringPolicy: import_room_pb2.ContinualGatheringPolicy.GATHER_CONTINUALLY,
51
51
  iceServers: []
52
52
  };
53
- const defaultRoomOptions = {
53
+ const defaultRoomOptions = new import_room_pb.RoomOptions({
54
54
  autoSubscribe: true,
55
55
  dynacast: false,
56
56
  e2ee: void 0,
57
57
  rtcConfig: void 0,
58
58
  adaptiveStream: false,
59
59
  joinRetries: 1
60
- };
60
+ });
61
61
  class Room extends import_events.default {
62
62
  constructor() {
63
63
  super();
64
- this.connectionState = import_room_pb.ConnectionState.CONN_DISCONNECTED;
64
+ this.connectionState = import_room_pb2.ConnectionState.CONN_DISCONNECTED;
65
65
  this.remoteParticipants = /* @__PURE__ */ new Map();
66
66
  this.onFfiEvent = (ffiEvent) => {
67
- if (!this.localParticipant || !this.ffiHandle || !this.info) {
68
- throw TypeError("cannot handle ffi events before connectCallback");
69
- }
70
- if (ffiEvent.message.case == "rpcMethodInvocation") {
71
- if (ffiEvent.message.value.localParticipantHandle == this.localParticipant.ffi_handle.handle) {
72
- this.localParticipant.handleRpcMethodInvocation(
73
- ffiEvent.message.value.invocationId,
74
- ffiEvent.message.value.method,
75
- ffiEvent.message.value.requestId,
76
- ffiEvent.message.value.callerIdentity,
77
- ffiEvent.message.value.payload,
78
- ffiEvent.message.value.responseTimeoutMs
79
- );
80
- }
81
- return;
82
- } else if (ffiEvent.message.case != "roomEvent" || ffiEvent.message.value.roomHandle != this.ffiHandle.handle) {
67
+ var _a;
68
+ if (ffiEvent.message.case != "roomEvent" || ffiEvent.message.value.roomHandle != ((_a = this.ffiHandle) == null ? void 0 : _a.handle)) {
83
69
  return;
84
70
  }
85
71
  const ev = ffiEvent.message.value.message;
@@ -89,82 +75,65 @@ class Room extends import_events.default {
89
75
  this.emit("participantConnected" /* ParticipantConnected */, participant);
90
76
  } else if (ev.case == "participantDisconnected") {
91
77
  const participant = this.remoteParticipants.get(ev.value.participantIdentity);
92
- if (participant) {
93
- this.remoteParticipants.delete(participant.identity);
94
- this.emit("participantDisconnected" /* ParticipantDisconnected */, participant);
95
- }
78
+ this.remoteParticipants.delete(participant.identity);
79
+ this.emit("participantDisconnected" /* ParticipantDisconnected */, participant);
96
80
  } else if (ev.case == "localTrackPublished") {
97
81
  const publication = this.localParticipant.trackPublications.get(ev.value.trackSid);
98
- if (!publication) {
99
- throw new TypeError("local track publication not found");
100
- }
101
82
  this.emit("localTrackPublished" /* LocalTrackPublished */, publication, this.localParticipant);
102
83
  } else if (ev.case == "localTrackUnpublished") {
103
84
  const publication = this.localParticipant.trackPublications.get(ev.value.publicationSid);
104
85
  this.localParticipant.trackPublications.delete(ev.value.publicationSid);
105
- if (publication) {
106
- this.emit("localTrackUnpublished" /* LocalTrackUnpublished */, publication, this.localParticipant);
107
- }
86
+ this.emit("localTrackUnpublished" /* LocalTrackUnpublished */, publication, this.localParticipant);
108
87
  } else if (ev.case == "localTrackSubscribed") {
109
88
  const publication = this.localParticipant.trackPublications.get(ev.value.trackSid);
110
- if (!publication) {
111
- throw new TypeError("local track publication not found");
112
- }
113
89
  publication.resolveFirstSubscription();
114
90
  this.emit("localTrackSubscribed" /* LocalTrackSubscribed */, publication.track);
115
91
  } else if (ev.case == "trackPublished") {
116
- const participant = this.requireRemoteParticipant(ev.value.participantIdentity);
92
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
117
93
  const publication = new import_track_publication.RemoteTrackPublication(ev.value.publication);
118
94
  participant.trackPublications.set(publication.sid, publication);
119
95
  this.emit("trackPublished" /* TrackPublished */, publication, participant);
120
96
  } else if (ev.case == "trackUnpublished") {
121
- const participant = this.requireRemoteParticipant(ev.value.participantIdentity);
97
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
122
98
  const publication = participant.trackPublications.get(ev.value.publicationSid);
123
99
  participant.trackPublications.delete(ev.value.publicationSid);
124
- if (publication) {
125
- this.emit("trackUnpublished" /* TrackUnpublished */, publication, participant);
126
- }
100
+ this.emit("trackUnpublished" /* TrackUnpublished */, publication, participant);
127
101
  } else if (ev.case == "trackSubscribed") {
128
102
  const ownedTrack = ev.value.track;
129
- const trackInfo = ownedTrack.info;
130
- const { participant, publication } = this.requirePublicationOfRemoteParticipant(
131
- ev.value.participantIdentity,
132
- trackInfo.sid
133
- );
103
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
104
+ const publication = participant.trackPublications.get(ownedTrack.info.sid);
134
105
  publication.subscribed = true;
135
- if (trackInfo.kind == import_track_pb.TrackKind.KIND_VIDEO) {
106
+ if (ownedTrack.info.kind == import_track_pb.TrackKind.KIND_VIDEO) {
136
107
  publication.track = new import_track.RemoteVideoTrack(ownedTrack);
137
- } else if (trackInfo.kind == import_track_pb.TrackKind.KIND_AUDIO) {
108
+ } else if (ownedTrack.info.kind == import_track_pb.TrackKind.KIND_AUDIO) {
138
109
  publication.track = new import_track.RemoteAudioTrack(ownedTrack);
139
110
  }
140
111
  this.emit("trackSubscribed" /* TrackSubscribed */, publication.track, publication, participant);
141
112
  } else if (ev.case == "trackUnsubscribed") {
142
- const { participant, publication } = this.requirePublicationOfRemoteParticipant(
143
- ev.value.participantIdentity,
144
- ev.value.trackSid
145
- );
146
- const track = publication.track;
113
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
114
+ const publication = participant.trackPublications.get(ev.value.trackSid);
147
115
  publication.track = void 0;
148
116
  publication.subscribed = false;
149
- this.emit("trackUnsubscribed" /* TrackUnsubscribed */, track, publication, participant);
117
+ this.emit("trackUnsubscribed" /* TrackUnsubscribed */, publication.track, publication, participant);
150
118
  } else if (ev.case == "trackSubscriptionFailed") {
151
- const participant = this.requireRemoteParticipant(ev.value.participantIdentity);
152
- this.emit("trackSubscriptionFailed" /* TrackSubscriptionFailed */, ev.value.trackSid, participant, ev.value.error);
153
- } else if (ev.case == "trackMuted") {
154
- const { participant, publication } = this.requirePublicationOfParticipant(
155
- ev.value.participantIdentity,
156
- ev.value.trackSid
119
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
120
+ this.emit(
121
+ "trackSubscriptionFailed" /* TrackSubscriptionFailed */,
122
+ ev.value.trackSid,
123
+ participant,
124
+ ev.value.error
157
125
  );
126
+ } else if (ev.case == "trackMuted") {
127
+ const participant = this.remoteParticipants.get(ev.value.participantIdentity);
128
+ const publication = participant.trackPublications.get(ev.value.trackSid);
158
129
  publication.info.muted = true;
159
130
  if (publication.track) {
160
131
  publication.track.info.muted = true;
161
132
  }
162
133
  this.emit("trackMuted" /* TrackMuted */, publication, participant);
163
134
  } else if (ev.case == "trackUnmuted") {
164
- const { participant, publication } = this.requirePublicationOfParticipant(
165
- ev.value.participantIdentity,
166
- ev.value.trackSid
167
- );
135
+ const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
136
+ const publication = participant.trackPublications.get(ev.value.trackSid);
168
137
  publication.info.muted = false;
169
138
  if (publication.track) {
170
139
  publication.track.info.muted = false;
@@ -172,41 +141,47 @@ class Room extends import_events.default {
172
141
  this.emit("trackUnmuted" /* TrackUnmuted */, publication, participant);
173
142
  } else if (ev.case == "activeSpeakersChanged") {
174
143
  const activeSpeakers = ev.value.participantIdentities.map(
175
- (identity) => this.requireParticipantByIdentity(identity)
144
+ (identity) => this.retrieveParticipantByIdentity(identity)
145
+ );
146
+ this.emit(
147
+ "activeSpeakersChanged" /* ActiveSpeakersChanged */,
148
+ activeSpeakers.map((s) => s)
176
149
  );
177
- this.emit("activeSpeakersChanged" /* ActiveSpeakersChanged */, activeSpeakers);
178
150
  } else if (ev.case == "roomMetadataChanged") {
179
151
  this.info.metadata = ev.value.metadata;
180
152
  this.emit("roomMetadataChanged" /* RoomMetadataChanged */, this.info.metadata);
181
153
  } else if (ev.case == "participantMetadataChanged") {
182
- const participant = this.requireParticipantByIdentity(ev.value.participantIdentity);
154
+ const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
183
155
  participant.info.metadata = ev.value.metadata;
184
156
  this.emit("participantMetadataChanged" /* ParticipantMetadataChanged */, participant.metadata, participant);
185
157
  } else if (ev.case == "participantNameChanged") {
186
- const participant = this.requireParticipantByIdentity(ev.value.participantIdentity);
158
+ const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
187
159
  participant.info.name = ev.value.name;
188
160
  this.emit("participantNameChanged" /* ParticipantNameChanged */, participant.name, participant);
189
161
  } else if (ev.case == "participantAttributesChanged") {
190
- const participant = this.requireParticipantByIdentity(ev.value.participantIdentity);
162
+ const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
191
163
  participant.info.attributes = ev.value.attributes.reduce(
192
- (acc, value) => {
193
- acc[value.key] = value.value;
194
- return acc;
164
+ (obj, item) => {
165
+ obj[item.key] = item.value;
166
+ return obj;
195
167
  },
196
168
  {}
197
169
  );
198
170
  if (Object.keys(ev.value.changedAttributes).length > 0) {
199
- const changedAttributes = ev.value.changedAttributes.reduce(
200
- (acc, value) => {
201
- acc[value.key] = value.value;
202
- return acc;
203
- },
204
- {}
171
+ this.emit(
172
+ "participantAttributesChanged" /* ParticipantAttributesChanged */,
173
+ ev.value.changedAttributes.reduce(
174
+ (obj, item) => {
175
+ obj[item.key] = item.value;
176
+ return obj;
177
+ },
178
+ {}
179
+ ),
180
+ participant
205
181
  );
206
- this.emit("participantAttributesChanged" /* ParticipantAttributesChanged */, changedAttributes, participant);
207
182
  }
208
183
  } else if (ev.case == "connectionQualityChanged") {
209
- const participant = this.requireParticipantByIdentity(ev.value.participantIdentity);
184
+ const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
210
185
  this.emit("connectionQualityChanged" /* ConnectionQualityChanged */, ev.value.quality, participant);
211
186
  } else if (ev.case == "chatMessage") {
212
187
  const participant = this.retrieveParticipantByIdentity(ev.value.participantIdentity);
@@ -224,8 +199,10 @@ class Room extends import_events.default {
224
199
  const dataPacket = ev.value.value;
225
200
  switch (dataPacket.case) {
226
201
  case "user":
227
- const data = dataPacket.value.data.data;
228
- const buffer = import_ffi_client.FfiClient.instance.copyBuffer(data.dataPtr, Number(data.dataLen));
202
+ const buffer = import_ffi_client.FfiClient.instance.copyBuffer(
203
+ dataPacket.value.data.data.dataPtr,
204
+ Number(dataPacket.value.data.data.dataLen)
205
+ );
229
206
  new import_ffi_client.FfiHandle(dataPacket.value.data.handle.id).dispose();
230
207
  this.emit(
231
208
  "dataReceived" /* DataReceived */,
@@ -255,8 +232,6 @@ class Room extends import_events.default {
255
232
  this.emit("reconnecting" /* Reconnecting */);
256
233
  } else if (ev.case == "reconnected") {
257
234
  this.emit("reconnected" /* Reconnected */);
258
- } else if (ev.case == "roomSidChanged") {
259
- this.emit("roomSidChanged" /* RoomSidChanged */, ev.value.sid);
260
235
  }
261
236
  };
262
237
  }
@@ -269,32 +244,16 @@ class Room extends import_events.default {
269
244
  return (_a = this.info) == null ? void 0 : _a.metadata;
270
245
  }
271
246
  get isConnected() {
272
- return this.ffiHandle != void 0 && this.connectionState != import_room_pb.ConnectionState.CONN_DISCONNECTED;
247
+ return this.ffiHandle != void 0 && this.connectionState != import_room_pb2.ConnectionState.CONN_DISCONNECTED;
273
248
  }
274
249
  async getSid() {
275
- if (!this.isConnected) {
276
- return "";
277
- }
278
- if (this.info && this.info.sid !== "") {
279
- return this.info.sid;
280
- }
281
- return new Promise((resolve, reject) => {
282
- const handleRoomUpdate = (sid) => {
283
- if (sid !== "") {
284
- this.off("roomSidChanged" /* RoomSidChanged */, handleRoomUpdate);
285
- resolve(sid);
286
- }
287
- };
288
- this.on("roomSidChanged" /* RoomSidChanged */, handleRoomUpdate);
289
- this.once("disconnected" /* Disconnected */, () => {
290
- this.off("roomSidChanged" /* RoomSidChanged */, handleRoomUpdate);
291
- reject("Room disconnected before room server id was available");
292
- });
293
- });
250
+ var _a;
251
+ return (_a = this.info) == null ? void 0 : _a.sid;
294
252
  }
295
253
  async connect(url, token, opts) {
254
+ var _a, _b;
296
255
  const options = { ...defaultRoomOptions, ...opts };
297
- const req = (0, import_protobuf.create)(import_room_pb.ConnectRequestSchema, {
256
+ const req = new import_room_pb2.ConnectRequest({
298
257
  url,
299
258
  token,
300
259
  options
@@ -308,35 +267,45 @@ class Room extends import_events.default {
308
267
  const cb = await import_ffi_client.FfiClient.instance.waitFor((ev) => {
309
268
  return ev.message.case == "connect" && ev.message.value.asyncId == res.asyncId;
310
269
  });
311
- if (cb.message.case !== "result") {
312
- throw new ConnectError(cb.message.value ?? "Unknown error");
313
- }
314
- const { room, localParticipant, participants } = cb.message.value;
315
- this.ffiHandle = new import_ffi_client.FfiHandle(room.handle.id);
316
- if (options.e2ee) {
317
- this.e2eeManager = new import_e2ee.E2EEManager(this.ffiHandle.handle, options.e2ee);
318
- }
319
- this.info = room.info;
320
- this.connectionState = import_room_pb.ConnectionState.CONN_CONNECTED;
321
- this.localParticipant = new import_participant.LocalParticipant(localParticipant);
322
- for (const pt of participants) {
323
- const rp = this.createRemoteParticipant(pt.participant);
324
- for (const pub of pt.publications) {
325
- const publication = new import_track_publication.RemoteTrackPublication(pub);
326
- rp.trackPublications.set(publication.sid, publication);
327
- }
270
+ switch (cb.message.case) {
271
+ case "result":
272
+ this.ffiHandle = new import_ffi_client.FfiHandle(cb.message.value.room.handle.id);
273
+ this.e2eeManager = new import_e2ee.E2EEManager(this.ffiHandle.handle, {
274
+ keyProviderOptions: {
275
+ sharedKey: (_b = (_a = options.e2ee) == null ? void 0 : _a.keyProviderOptions) == null ? void 0 : _b.sharedKey,
276
+ ratchetSalt: options.e2ee.keyProviderOptions.ratchetSalt,
277
+ ratchetWindowSize: options.e2ee.keyProviderOptions.ratchetWindowSize,
278
+ failureTolerance: options.e2ee.keyProviderOptions.failureTolerance
279
+ },
280
+ encryptionType: options.e2ee.encryptionType
281
+ });
282
+ this.info = cb.message.value.room.info;
283
+ this.connectionState = import_room_pb2.ConnectionState.CONN_CONNECTED;
284
+ this.localParticipant = new import_participant.LocalParticipant(cb.message.value.localParticipant);
285
+ for (const pt of cb.message.value.participants) {
286
+ const rp = this.createRemoteParticipant(pt.participant);
287
+ for (const pub of pt.publications) {
288
+ const publication = new import_track_publication.RemoteTrackPublication(pub);
289
+ rp.trackPublications.set(publication.sid, publication);
290
+ }
291
+ }
292
+ import_ffi_client.FfiClient.instance.on(import_ffi_client.FfiClientEvent.FfiEvent, this.onFfiEvent);
293
+ break;
294
+ case "error":
295
+ default:
296
+ throw new ConnectError(cb.message.value || "");
328
297
  }
329
- import_ffi_client.FfiClient.instance.on(import_ffi_client.FfiClientEvent.FfiEvent, this.onFfiEvent);
330
298
  }
331
299
  async disconnect() {
332
- if (!this.isConnected || !this.ffiHandle) {
300
+ var _a;
301
+ if (!this.isConnected) {
333
302
  return;
334
303
  }
335
304
  import_ffi_client.FfiClient.instance.request({
336
305
  message: {
337
306
  case: "disconnect",
338
307
  value: {
339
- roomHandle: this.ffiHandle.handle
308
+ roomHandle: (_a = this.ffiHandle) == null ? void 0 : _a.handle
340
309
  }
341
310
  }
342
311
  });
@@ -413,7 +382,6 @@ var RoomEvent = /* @__PURE__ */ ((RoomEvent2) => {
413
382
  RoomEvent2["TrackUnmuted"] = "trackUnmuted";
414
383
  RoomEvent2["ActiveSpeakersChanged"] = "activeSpeakersChanged";
415
384
  RoomEvent2["RoomMetadataChanged"] = "roomMetadataChanged";
416
- RoomEvent2["RoomSidChanged"] = "roomSidChanged";
417
385
  RoomEvent2["ParticipantMetadataChanged"] = "participantMetadataChanged";
418
386
  RoomEvent2["ParticipantNameChanged"] = "participantNameChanged";
419
387
  RoomEvent2["ParticipantAttributesChanged"] = "participantAttributesChanged";