I'm trying to list out assets that use 3rd party imbedded scripts for a paywall product within a React component. I'm having trouble wrapping my mind around what needs to be done to imbed a script plus code that creates an object based upon that script.
In plain HTML, all I need to do is include the reference to the paywall script and then imbed this script to create the paywall object. Can someone help me figure out how to get this working in React?
Paywall library:
<script type="text/javascript" src="https://assets.inplayer.com/paywall/v3/staging/paywall.min.js"></script>
Individual Asset (imbed code):
<div id="inplayer-99999" class="inplayer-paywall"></div>
<script>
var paywall = new InplayerPaywall('{hidden guid}', [{
id: 99999,
options: {
brandingId: 1234,
preselectedFeeId: 19999
}
}], {
oauthAppKey: '{hidden guid}'
});
</script>