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?
在npm上尝试使用此包react-jwplayer
,只需将videoId添加到该组件即可。
import JWPlayer from 'react-jwplayer'; <JWPlayer videoId="<your-id-here>" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.