jwplayer - jquery: update src, update html created by script -


This is a strange question, I think ...

I use a video player I am & lt; Script & gt; When a page loads, a video is displayed based on the URL of the script's src :

  & nbsp;  The plugin ("Beatsman") Lt; Script type = "text / javascript" src = "http: //content.bitsontherun.com/players/123ABC-DEF456.js"></script>   

Where "123ABC-DEF456" is the unique ID for the video. I would like to be able to reload the script with a new video ID, and the player who creates the click on that link.

Does anyone have any idea about how to do this. I think I should be able to manipulate the dom, but it is definitely sure to use it ( getScript () ?).


Edit

I have decided to go to another route, using the iframe and updating the source of iframe with the video ID in the query string. Used to be.

I will just replace it with a new script tag first, I divide it into a div or duration I will put in

  & lt; Div id = "videobox" & gt; & Lt; Script type = "text / javascript" src = "http://content.bitsontherun.com/players/123 ABC- DEF456.js" & gt; & Lt; / Script & gt; & Lt; / Div & gt;   

Then when you're ready to change it, change the #Wideobox's HTML content.

  var videoID; // set it but you get $ ("# videobox") Html ('& lt; script type = "text / javascript" src = "http://content.bitsontherun.com/players/' + videoID + '.js want" & gt; & lt; / script & gt; ');    

Comments