Fix interactive video (#350)

* n

* remove template

* Add templates

* remove print
This commit is contained in:
Freddy Boulton
2025-06-13 12:22:38 -04:00
committed by GitHub
parent b9c3f01e9f
commit 3abe0a4d8a
45 changed files with 4697 additions and 4672 deletions

View File

@@ -114,14 +114,14 @@ class VideoCallback(VideoStreamTrack):
self.channel_set.set()
def set_args(self, args: list[Any]):
self.latest_args = ["__webrtc_value__"] + list(args)
self.latest_args = list(args)
def add_frame_to_payload(
self, args: list[Any], frame: np.ndarray | None
) -> list[Any]:
new_args = []
for val in args:
if isinstance(val, str) and val == "__webrtc_value__":
for i, val in enumerate(args):
if i == 0:
new_args.append(frame)
else:
new_args.append(val)