reactor-runtime 3.3.2__tar.gz → 3.4.0__tar.gz

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 (104) hide show
  1. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/PKG-INFO +2 -2
  2. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/pyproject.toml +2 -2
  3. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/pyproject.toml.orig +2 -2
  4. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/config.py +13 -0
  5. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/peer.py +17 -5
  6. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/LICENSE +0 -0
  7. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/NOTICE +0 -0
  8. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/README.md +0 -0
  9. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/__init__.py +0 -0
  10. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/codes.py +0 -0
  11. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/__init__.py +0 -0
  12. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/fields.py +0 -0
  13. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/model.py +0 -0
  14. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/naming.py +0 -0
  15. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/service.py +0 -0
  16. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/session.py +0 -0
  17. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/transport.py +0 -0
  18. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/typespec.py +0 -0
  19. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/core/values.py +0 -0
  20. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/event_stream.py +0 -0
  21. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/http/__init__.py +0 -0
  22. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/http/events.py +0 -0
  23. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/http/routes.py +0 -0
  24. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/http/server.py +0 -0
  25. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/http/spec.py +0 -0
  26. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/__init__.py +0 -0
  27. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/client.py +0 -0
  28. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/events/__init__.py +0 -0
  29. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/events/decorators.py +0 -0
  30. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/events/errors.py +0 -0
  31. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/events/messages.py +0 -0
  32. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/internal/__init__.py +0 -0
  33. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/internal/bridge.py +0 -0
  34. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/internal/input_buffer.py +0 -0
  35. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/internal/reactor_core.py +0 -0
  36. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/model/__init__.py +0 -0
  37. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/model/contract.py +0 -0
  38. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/model/reactor_model.py +0 -0
  39. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/model/schema.py +0 -0
  40. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/pipeline/__init__.py +0 -0
  41. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/pipeline/idle.py +0 -0
  42. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/pipeline/input_state.py +0 -0
  43. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/pipeline/reactor_pipeline.py +0 -0
  44. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/tracks/__init__.py +0 -0
  45. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/tracks/descriptors.py +0 -0
  46. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/tracks/input.py +0 -0
  47. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/interface/tracks/output.py +0 -0
  48. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/log.py +0 -0
  49. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/manifest.py +0 -0
  50. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/message_gateway.py +0 -0
  51. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/metrics/__init__.py +0 -0
  52. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/metrics/command.py +0 -0
  53. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/metrics/model.py +0 -0
  54. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/metrics/registry.py +0 -0
  55. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/metrics/session.py +0 -0
  56. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/paths.py +0 -0
  57. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/__init__.py +0 -0
  58. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/base.py +0 -0
  59. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/common.py +0 -0
  60. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/v0/__init__.py +0 -0
  61. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/v0/codec.py +0 -0
  62. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/v1/__init__.py +0 -0
  63. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/protocol/v1/codec.py +0 -0
  64. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/py.typed +0 -0
  65. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/recording/__init__.py +0 -0
  66. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/recording/chunk_encoder.py +0 -0
  67. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/recording/markers.py +0 -0
  68. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/recording/recorder.py +0 -0
  69. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/__init__.py +0 -0
  70. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/connection_manager.py +0 -0
  71. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/offer_epochs.py +0 -0
  72. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/runner.py +0 -0
  73. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/state_machine.py +0 -0
  74. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/runner/upload_resolution.py +0 -0
  75. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/schema.py +0 -0
  76. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/serve.py +0 -0
  77. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/service.py +0 -0
  78. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/__init__.py +0 -0
  79. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/acceptor.py +0 -0
  80. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/router.py +0 -0
  81. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/__init__.py +0 -0
  82. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/acceptor.py +0 -0
  83. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/connection.py +0 -0
  84. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/frames.py +0 -0
  85. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/metrics.py +0 -0
  86. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/pacer.py +0 -0
  87. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/router.py +0 -0
  88. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/sdp.py +0 -0
  89. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/signaling.py +0 -0
  90. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/stats.py +0 -0
  91. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/transport/webrtc/version.py +0 -0
  92. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_runtime/upload_store.py +0 -0
  93. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/common_pb2.py +0 -0
  94. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/common_pb2.pyi +0 -0
  95. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/control_pb2.py +0 -0
  96. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/control_pb2.pyi +0 -0
  97. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/data_pb2.py +0 -0
  98. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/data_pb2.pyi +0 -0
  99. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/model_pb2.py +0 -0
  100. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/model_pb2.pyi +0 -0
  101. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/platform_pb2.py +0 -0
  102. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/platform_pb2.pyi +0 -0
  103. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/track_pb2.py +0 -0
  104. {reactor_runtime-3.3.2 → reactor_runtime-3.4.0}/src/reactor_wire/v1/track_pb2.pyi +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reactor-runtime
3
- Version: 3.3.2
3
+ Version: 3.4.0
4
4
  Summary: A Python framework for building real-time, interactive video models
5
5
  Author: Reactor
6
6
  Author-email: Reactor <team@reactor.inc>
@@ -18,7 +18,7 @@ Requires-Dist: numpy>=2.1
18
18
  Requires-Dist: prometheus-client>=0.26.0
19
19
  Requires-Dist: protobuf>=7.35.1
20
20
  Requires-Dist: pyyaml>=6.0.3
21
- Requires-Dist: reactor-webrtc==0.17.0
21
+ Requires-Dist: reactor-webrtc==0.18.0
22
22
  Requires-Dist: uvicorn>=0.49.0
23
23
  Requires-Python: >=3.12
24
24
  Project-URL: Source, https://github.com/reactor-team/reactor-runtime
@@ -92,7 +92,7 @@ pythonpath = ["."]
92
92
 
93
93
  [project]
94
94
  name = "reactor-runtime"
95
- version = "3.3.2"
95
+ version = "3.4.0"
96
96
  description = "A Python framework for building real-time, interactive video models"
97
97
  readme = "README.md"
98
98
  license = "Apache-2.0"
@@ -115,7 +115,7 @@ dependencies = [
115
115
  "prometheus-client>=0.26.0",
116
116
  "protobuf>=7.35.1",
117
117
  "pyyaml>=6.0.3",
118
- "reactor-webrtc==0.17.0",
118
+ "reactor-webrtc==0.18.0",
119
119
  "uvicorn>=0.49.0",
120
120
  ]
121
121
 
@@ -20,7 +20,7 @@ version = "1.20260814.7"
20
20
 
21
21
  [project]
22
22
  name = "reactor-runtime"
23
- version = "3.3.2"
23
+ version = "3.4.0"
24
24
  description = "A Python framework for building real-time, interactive video models"
25
25
  readme = "README.md"
26
26
  license = "Apache-2.0"
@@ -41,7 +41,7 @@ dependencies = [
41
41
  "prometheus-client>=0.26.0",
42
42
  "protobuf>=7.35.1",
43
43
  "pyyaml>=6.0.3",
44
- "reactor-webrtc==0.17.0",
44
+ "reactor-webrtc==0.18.0",
45
45
  "uvicorn>=0.49.0",
46
46
  ]
47
47
 
@@ -166,6 +166,18 @@ class WebRtcConfig:
166
166
  ICE is closed and its slot freed once this passes, so a stalled or
167
167
  hostile half-open offer cannot hold a slot against ``max_connections``
168
168
  for the process's life. ``0`` or less disables the deadline.
169
+ warp: Whether to accelerate connection setup with the WARP opt-ins,
170
+ SNAP (draft-hancke-tsvwg-snap) and SPED (draft-hancke-webrtc-sped).
171
+ SNAP mirrors the offer's SCTP INIT parameters so the data channel
172
+ skips the cookie exchange; SPED carries the DTLS handshake inside
173
+ the ICE binding requests. Both take effect only when the peer asks
174
+ for them, and a peer that does not gets the ordinary handshake, so
175
+ this is safe to leave on against any client.
176
+
177
+ SNAP is per connection. SPED is process-wide: libwebrtc reads it
178
+ from the media engine's environment, and the engine is built once
179
+ on the first connection, so the first connection's value is the
180
+ one the process keeps.
169
181
  """
170
182
 
171
183
  ice_servers: tuple[IceServer, ...] = ()
@@ -191,3 +203,4 @@ class WebRtcConfig:
191
203
  ice_gathering_timeout_ms: int = 3000
192
204
  max_connections: int = 64
193
205
  negotiation_timeout: float = 30.0
206
+ warp: bool = True
@@ -202,20 +202,32 @@ _factory_lock = threading.Lock()
202
202
  _factory: rw.PeerConnectionFactory | None = None
203
203
 
204
204
 
205
- def _get_factory() -> rw.PeerConnectionFactory:
206
- """Return the process-wide media engine, creating it on first use."""
205
+ def _get_factory(config: WebRtcConfig) -> rw.PeerConnectionFactory:
206
+ """Return the process-wide media engine, creating it on first use.
207
+
208
+ The engine carries the SPED half of *config*'s WARP setting, which libwebrtc
209
+ reads from the engine's environment rather than per connection. The engine
210
+ outlives the connection that built it, so the first connection to arrive
211
+ fixes SPED for the process.
212
+ """
207
213
  global _factory
208
214
  if _factory is None:
209
215
  with _factory_lock:
210
216
  if _factory is None:
211
- _factory = rw.PeerConnectionFactory()
217
+ builder = rw.PeerConnectionFactoryBuilder()
218
+ builder.with_dtls_in_stun(config.warp)
219
+ _factory = builder.build()
212
220
  return _factory
213
221
 
214
222
 
215
223
  def _build_rtc_config(config: WebRtcConfig) -> rw.RtcConfiguration:
216
- """Translate the transport config's ICE servers and port range into a libwebrtc config."""
224
+ """Translate the transport config's ICE servers, port range, and WARP setting.
225
+
226
+ Returns the libwebrtc configuration the connection is created with.
227
+ """
217
228
  rtc = rw.RtcConfiguration()
218
229
  rtc.ice_transport_type = str(config.transport_policy)
230
+ rtc.sctp_snap = config.warp
219
231
  if config.ice_servers:
220
232
  rtc.ice_servers = [
221
233
  rw.IceServer(
@@ -458,7 +470,7 @@ class WebRTCPeer:
458
470
 
459
471
  loop = asyncio.get_running_loop()
460
472
  self._loop = loop
461
- factory = _get_factory()
473
+ factory = _get_factory(self._config)
462
474
 
463
475
  observer = rw.PeerConnectionObserver()
464
476
  observer.on_connection_state_change = self._on_connection_state_change
File without changes
File without changes