Skip to content

Scalable Video Codec include an SVC support check #1597

@opusonline

Description

@opusonline

Please read first!

Please use discuss-webrtc for general technical discussions and questions.
If you have found an issue/bug with the native libwebrtc SDK or a browser's behaviour around WebRTC please create an issue in the relevant bug tracker. You can find more information on how to submit a bug and do so in the right place here

  • I understand that issues created here are only relevant to the samples in this repo - not browser or SDK bugs
  • I have provided steps to reproduce
  • I have provided browser name and version
  • I have provided a link to the sample here or a modified version thereof

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed.

Browser affected

Browser name including version (e.g. Chrome 64.0.3282.119)
Google Chrome 110.0.5481.77

Description

Add a check if SVC is supported in the current browser to the SVC sample, since even Chrome >= 101 will report supported: true in MediaCapabilities.encodingInfo() with scalabilityMode. But SVC is only supported in Chrome >= 111 (see https://chromestatus.com/feature/5769626174619648).

The only way I could find to check this, is something like:

() => {
  let supported = false;
  try {
      const pc = new RTCPeerConnection();
      const scalabilityMode = 'L2T2';
      const transceiver = pc.addTransceiver('video', { sendEncodings: [{ scalabilityMode }] });
      const parameters = transceiver.sender.getParameters();
      const [encoding] = parameters.encodings || [];
      supported = Boolean(encoding && encoding.scalabilityMode === scalabilityMode);
  } catch (error) {
      console.error(error);
  }
  return supported;
};

Steps to reproduce

Open the SVC sample https://webrtc.github.io/samples/src/content/extensions/svc/ in a Chrome browser >=101 and < 111. Click the "Start button", allow camera access, select "video/VP8" as Codec preferences.

Expected results

Since SVC is not supported in Chrome < 111, the list of scalability modes should be empty.

Actual results

The list of scalability modes include L1T1, L1T2, and L1T3.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions