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

isConfigSupported: definition of "invalid"

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

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
api, web-dev

Hướng nghiên cứu

Bắt đầu với phần văn bản đặc tả được trích dẫn trong issue và tái hiện ví dụ trực tiếp tại https://webrtc.internaut.com/wc/isup2/ trên Chromium và Safari. So sánh cách VideoEncoder.isConfigSupported và VideoDecoder.isConfigSupported xử lý các giá trị scalabilityMode không được hỗ trợ; được xem là hoàn tất khi sự khác biệt giữa đặc tả và phần triển khai đã có hướng giải quyết rõ ràng.

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

Mô tả

needs-tests

The behavior of isConfigSupported API for unsupported configurations is different on Chromium and Safari.

The specification says (for Audio and Video encoders and decoders):

"If config is not a valid.... return a promise rejected with TypeError."

However, the definition of "invalid" appears to differ between implementations.

On Chromium, when an unsupported scalabilityMode value is provided, the promise resolves with supported set to "false", but on Safari, the promise is rejected.

Live example: https://webrtc.internaut.com/wc/isup2/

A snippet:

async function modeProperties(mode, enc, config) {
  config.scalabilityMode = mode;
  if (enc == 'true') {
    // check whether the encoder supports the configuration
    try {
      const encoderSupport = await VideoEncoder.isConfigSupported(config);
      if (encoderSupport.supported) {
        addToEventLog('For encode ' + preferredCodec + ' ' + mode + ' is supported');
      } else {
        addToEventLog('For encode ' + preferredCodec + ' ' + mode + ' is NOT supported');
        //addToEventLog('Config details:\n' + JSON.stringify(encoderSupport.config));
      }
    } catch (e) {
     // Safari will end up here for unsupported scalabilityMode values, Chromium will not
      addToEventLog('For encode ' + preferredCodec + ' ' + mode + ' is considered INVALID');
    }
  } else {
    // check whether the decoder supports the configuration
    try {
      const decoderSupport = await VideoDecoder.isConfigSupported(config);
      if (decoderSupport.supported) {
        addToEventLog('For decode ' + preferredCodec + ' ' + mode + ' is supported');
      } else {
        addToEventLog('For decode ' + preferredCodec + ' ' + mode + ' is NOT supported');
      }
    } catch (e) {
     // Safari will end up here for unsupported scalabilityMode values, Chromium will not
      addToEventLog('For decode ' + preferredCodec + ' ' + mode + ' is considered INVALID');
    }
  }
}
Ngôn ngữ chính
HTML
Star
1.3k
Fork
192
Merge trung bình
3 giờ 36 phút
Pull request đã merge (30 ngày)
7

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.