MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: SourceBuffer.changeType always fails with Edge 130 on Xbox

Open
#4,988 0 comments 0 reactions 1 assignee View on GitHub

@jennifer-nejad is already working on this.

Since Dec 13, 2024.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

What happened?

On Xbox, when using SourceBuffer.changeType to pass a new h264 codec profile, an error is always thrown mentioning the codec is not supported:

Failed to execute 'changeType' on 'SourceBuffer': Changing to the type provided ('video/mp4; codecs="avc1.xxx"') is not supported.

This does occur on Xbox using WebView2 with Edge v130, but cannot be reproduced when using a Chrome or Edge browser, or WebView2 with Edge v131 on a desktop.

Importance

Moderate. My app's user experience is affected, but still usable.

Runtime Channel

Stable release (WebView2 Runtime)

Runtime Version

No response

SDK Version

No response

Framework

WinUI2/UWP

Operating System

Xbox

OS Version

No response

Repro steps

When running this script. Any h264 codec profile being passed on changeType fails:

  if (window.MediaSource) {
    logMessage('Media Source Extensions are supported.');
    const video = document.getElementById('video');
    const mediaSource = new MediaSource();
    video.src = URL.createObjectURL(mediaSource);
    mediaSource.addEventListener('sourceopen', () => {
      logMessage('MediaSource is open.');
      try {
        const sourceBuffer = mediaSource.addSourceBuffer('video/mp4; codecs="avc1.4d0028"');
        logMessage('SourceBuffer created with initial type: avc1.4d0028.');
        sourceBuffer.changeType('video/mp4; codecs="avc1.4d001f"');
        logMessage('SourceBuffer type changed to: avc1.4d001f.');
      } catch (error) {
        logMessage(`Error changing SourceBuffer type: ${error.message}`);
      }
    });
  } else {
    logMessage('Media Source Extensions are not supported in this browser.');
  }
Repros in Edge Browser

No, issue does not reproduce in the corresponding Edge version

Regression

Don't know

Last working version (if regression)

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.