Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tvanlaerhoven opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@tvanlaerhoven
Copy link

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

@tvanlaerhoven tvanlaerhoven added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@tvanlaerhoven @jennifer-jacobs and others