Last active
November 9, 2016 13:45
-
-
Save mrandrewmills/cccb2878b83a5d293995ba13fedd120a to your computer and use it in GitHub Desktop.
Example using CommonSpot ADF renderScriptOnce method to load JWPlayer once and only once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfsavecontent variable="outputHTML"> | |
<cfoutput> | |
<script type="text/javascript" src="/common/commonspot/templates/js/jwplayer/jwplayer.js"></script> | |
<script type="text/javascript">jwplayer.key="PUT_YOUR_API_KEY_HERE_OBVIOUSLY";</script> | |
</cfoutput> | |
</cfsavecontent> | |
<cfoutput> | |
#application.adf.scriptsService.renderScriptOnce("JWPlayer", outputHTML)# | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's worth mentioning, if you're using CommonSpot 10, there's a menu option within the Site Admin for registering Libraries and Resources that may make this approach redundant and unnecessary.