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

Custom element already defined error #714

Open
anius opened this issue Jul 29, 2021 · 0 comments
Open

Custom element already defined error #714

anius opened this issue Jul 29, 2021 · 0 comments
Labels
bug Something isn't working player Related to player (media-stream-player-js package)

Comments

@anius
Copy link

anius commented Jul 29, 2021

Describe the bug
Currently if two different versions of MSP are used in the application you may end up with an error about already defined custom tag.

To Reproduce
Use yarn 2 or 3 and have different versions of peer dependencies in the application.

Screenshots
No screenshots available

Environment (please complete the following information):

  • OS: Os X
  • Browser: Chrome 92.0.4515.107
  • Version Latest as the code present in all the versions

Additional context
Add a check before the defining the custom element of MSP in lib/index.ts file:

window.customElements.define('media-stream-player', MediaStreamPlayer)

should be something like described here

@anius anius added the bug Something isn't working label Jul 29, 2021
@lekoaf lekoaf transferred this issue from AxisCommunications/media-stream-player-js Jan 25, 2023
@lekoaf lekoaf added the player Related to player (media-stream-player-js package) label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working player Related to player (media-stream-player-js package)
Projects
None yet
Development

No branches or pull requests

2 participants