Improve code comment for Chrome frame bug in Camera (#111504)

This commit is contained in:
On Freund 2024-02-26 22:30:35 +02:00 committed by GitHub
parent 4ea1c5cc3c
commit 32dc8d9fcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -300,8 +300,12 @@ async def async_get_still_stream(
if img_bytes != last_image:
await write_to_mjpeg_stream(img_bytes)
# Chrome seems to always ignore first picture,
# print it twice.
# Chrome always shows the n-1 frame:
# https://issues.chromium.org/issues/41199053
# https://issues.chromium.org/issues/40791855
# We send the first frame twice to ensure it shows
# Subsequent frames are not a concern at reasonable frame rates
# (even 1/10 FPS is about the latency of HLS)
if last_image is None:
await write_to_mjpeg_stream(img_bytes)
last_image = img_bytes