" /> " /> "/>

How would I use a video player thats embedded through a script tag with react.js

363 views Asked by At

I am trying to dynamically output some video content using an api (jwplayer). The api returns me some data to put in a script tag for instance: .js">

This tag works perfectly with plain html, but doesn't work with react jsx. How can I use this with a react component?

1

There are 1 answers

0
Rahmat Aligos On

Try this package react-jwplayer on npm just add your videoId to that component.

import JWPlayer from 'react-jwplayer'; <JWPlayer videoId="<your-id-here>" />