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

Bug: mux-video with hls: Error: Media element src was set while attaching MediaSource when adding tracks #933

Open
1 task done
endymion1818 opened this issue Jun 6, 2024 · 5 comments
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@endymion1818
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Which Mux Elements/Packages does this apply to? Select all that apply

mux-video

Which browsers are you using?

Chrome

Which operating systems are you using?

macOS

Description

I'm getting an error when supplying tracks to the mux-video web component.

[error] > Media element src was set while attaching MediaSource
Here's some example code:

<mux-video
src="https://some-hls-source"

The code I'm using in my component is more complex than this and involves the use of media-chrome, but even when I use straight up HTML without my wrapper component and the hosted version of mux-video it still occurs.

There's no documentation on the mux-video readme about s, but since it's an extension of HTML

How do I provide the captions, chapters etc without triggering this error?

Reduced test case

https://codepen.io/endymion1818/pen/RwmKQpq

Steps to reproduce

  1. Load the page
  2. See error in console

Current Behavior

An error is logged to the console although player renders and works as expected.

Expected Behavior

No error logged to the console.

Errors

[error] > Media element src was set while attaching MediaSource

What version of the package are you using?

v0.19.0

@endymion1818 endymion1818 added bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug labels Jun 6, 2024
@endymion1818
Copy link
Author

It looks like it could be a race condition because tracks need to download their src files asynchronously yet the player seems to render straight away

Screenshot 2024-06-06 at 10 34 44

@luwes
Copy link
Contributor

luwes commented Jun 11, 2024

I see the error but does this break anything in your program?
seems the captions still work as expected.

it's a strange error because the media element is different from the track element.
https://github.com/video-dev/hls.js/pull/5206/files

seems almost like that event bubbles up or something and the track src is wrongly compared with the media element src which is a blob.

@endymion1818
Copy link
Author

It doesn't break you're right, but we get a console error on each load, which is going to be a drain on our bug tracker. It will cause similar issues for third parties that embed our player too so we really want to avoid it if at all possible.

@luwes
Copy link
Contributor

luwes commented Jun 12, 2024

totally get that. how I see it currently is that it's a bug in hls.js, could you open an issue there and mention this ticket?
we'll follow it along.

@endymion1818
Copy link
Author

endymion1818 commented Jun 17, 2024

Thanks, I'm opening an issue there however some information I don't think I have access to: what is the hls.js configuration?

Also I've developed a new test case that outputs more information to the console, is this information more helpful?
https://embed-mediamanager-io-v3.pages.dev/storybook/?path=/story/media-manager-embeds--player

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants