We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfa00ed commit 9778ed2Copy full SHA for 9778ed2
examples/e2ee.py
@@ -47,8 +47,7 @@ async def draw_cube(source: rtc.VideoSource):
47
[3, 7],
48
]
49
50
- frame = rtc.ArgbFrame.create(rtc.VideoFormatType.FORMAT_ARGB, WIDTH, HEIGHT)
51
- arr = np.frombuffer(frame.data, dtype=np.uint8)
+ arr = np.zeros((WIDTH * HEIGHT * 4), dtype=np.uint8)
52
angle = 0
53
54
while True:
@@ -88,7 +87,7 @@ async def draw_cube(source: rtc.VideoSource):
88
87
idx = (y + dy) * WIDTH * 4 + (x + dx) * 4
89
arr[idx : idx + 4] = [255, 255, 255, 255]
90
91
- f = rtc.VideoFrame(frame.to_i420())
+ f = rtc.VideoFrame(WIDTH, HEIGHT, rtc.VideoBufferType.ARGB, arr)
92
source.capture_frame(f)
93
angle += 0.02
94
0 commit comments