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

Browsers compatibility is not the same as for media-chrome #36

Open
k-g-a opened this issue Sep 17, 2024 · 2 comments
Open

Browsers compatibility is not the same as for media-chrome #36

k-g-a opened this issue Sep 17, 2024 · 2 comments

Comments

@k-g-a
Copy link

k-g-a commented Sep 17, 2024

Some of the packages (at least media-tracks) are buit for relatively modern browsers (in contrast with media-chrome, which is built with --target=es2019 option). Moreover the custom-video-element sub-package is not built at all.

This leads to some features (i.e. private fields) being kept within distributed packages.
This, in turn, leads to errors on the end-user side when used with an old browser (i.e. Safari 14).

The only solution for now is to re-transpile those packages within the consuming application.

The proposed solution is to add --target=es2019 option to match the media-chrome build target.

@luwes
Copy link
Collaborator

luwes commented Sep 17, 2024

Thanks for bringing this issue up!

So far for our use case it's not a problem I believe because media-tracks and custom-media-element are meant to be imported in a custom media and rebuild. Are you running into this problem yourself?

@k-g-a
Copy link
Author

k-g-a commented Sep 24, 2024

Hi, @luwes!

Yes, we did ran into this problem after enhancing our internal media player (built upon hls.js + media-chrome) with both of those packages.

You are absolutely right that it's not a big deal and one can easily transpile those dependencies to any target within it's own library/application. So did we right after the first logged unhandled exception :)

But the point is that we just did not expect libraries coming from the same "vendor" and based on the same concepts to have substantial difference in browser support.

Perhaps we could just mention it somewhere in readme for the further consumers to have a lesser chance to face the same issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants