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