media-stream-library-js icon indicating copy to clipboard operation
media-stream-library-js copied to clipboard

Custom element already defined error

Open anius opened this issue 4 years ago • 0 comments

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 avatar Jul 29 '21 11:07 anius