Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

VideoFrame.copyTo is manipulating JS objects in a background queue

Đang mở
#955 8 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Djuffin đang làm issue này rồi.

Từ ngày 6/10/2026.

  • #958 của @Djuffin — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
api

Hướng nghiên cứu

Start with the WebCodecs specification's VideoFrame.copyTo algorithm and trace where the JS-visible destination is written and where RGB conversion occurs. Compare the four proposed API or specification directions, then define a chosen approach whose completion criteria cover safe destination mutation and the desired handling of RGB conversion.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

CR Blocking PR exists TPAC2026

As per https://w3c.github.io/webcodecs/#dom-videoframe-copyto, destination which is a JS visible object is written from a background queue task, which is an anti-pattern.
This creates problems (JS observability, destination mutating during the copyTo tasks).

There are various ways to fix this, for instance:

  1. make copyTo algorithm synchronous
  2. Expose a new asynchronous API that would transfer the destination buffer and provide the returned value as part of the promise value.
  3. Extend copyTo API surface to implement 2 within it.
  4. Change the spec to write destination asynchronously but in an event loop task with additional checks, even if UA may do it in a smarter way.

As a side note, copyTo algorithm is also synchronously converting to RGB.
It would be convenient to do this asynchronously, which is feasible by cloning the VideoFrame synchronously and using the cloned VideoFrame in the remainder of the algorithm.

Ngôn ngữ chính
HTML
Star
1.3k
Fork
191
Merge trung bình
21 giờ 7 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của w3c/webcodecs

Tất cả issue của w3c/webcodecs

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.