Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

isConfigSupported: definition of "invalid"

オープン
#744 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
領域
api, web-dev

調査の方向性

issue で引用されている仕様文から始め、https://webrtc.internaut.com/wc/isup2/ のライブ例を Chromium と Safari で再現します。VideoEncoder.isConfigSupported と VideoDecoder.isConfigSupported がサポートされていない scalabilityMode 値をどのように扱うかを比較します。仕様と実装の不一致について解決方針が決定されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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');
    }
  }
}
主要言語
HTML
スター
1.3k
フォーク
192
平均マージ
3時間 36分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

w3c/webcodecs のほかの issue

w3c/webcodecs の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。