![](https://secure.gravatar.com/avatar/4a10313313f7947d3f349535bb042ce3?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
JWplayer from within a webcomponent
Hello everyone!
I need to integrate JwPlayer within React application that subsequently-wrapped through a WebComponent.
Unfortunately I can not run JwPlayer when the container is inside the ShadowRoot. For simplicity I reduced the code to the bone, as a demonstration:
https://jsfiddle.net/43f94ef9/
I understand that passing the container ID to JwPlayer it can not find it, since it is within ShadowRoot, but can it be initialized by passing it directly to the element?
A thing like that:
const element = this.shadowRoot.querySelector ('# video player');
jwplayer (element) .setup ()
Has anyone else ever come across a similar problem?
Thank you