JPlayer playlist - need to move variable values from head to body
Hello
Please check the code below defined in the head tag.
I now need to move the myPlaylist.setPlaylist variable and from the head html tag into the body html tag., so I can change the playlist dynamically. Can you please advise?
Why? - I'm using a DNN module and injecting dynamic data. Unfortunately I can only inject data via tokens into the body and not the head.
Many Thanks...
- <link type="text/css" href="/script/jplayer/skin/pink.flag/css/jplayer.pink.flag.css" rel="stylesheet" />
- <script type="text/javascript" src="/script/jplayer/jplayer.playlist.min.js"></script>
- <script type="text/javascript" src="/script/jplayer/jquery.jplayer.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- var myPlaylist = new jPlayerPlaylist({
- jPlayer: "#jquery_jplayer_1",
- cssSelectorAncestor: "#jp_container_1"
- },[], {
- swfPath: "/script/jplayer",
- supplied: "mp3",
- wmode: "window",
- useStateClassSkin: true,
- autoBlur: false,
- smoothPlayBar: true,
- keyEnabled: true
- });
- myPlaylist.setPlaylist([
- {
- title:"MYTitle",
- artist:"MYArtist",
- mp3: "/Portals/0/_audio/MYFile.mp3"
-
- }
- ]);
- });
- </script>