The story is this: I deduce from the base the addresses and titles of video clips and put them in a list. The player want to use flowplayer. At the same time, in the a tag I leave the href empty.

 <a href='' style="display: block; width: 560px; height: 315px;" id="player"></a> 

Then, after selecting a video from the list, I run the script, with which I fill out the href and in the same script I launch the flowplayer. And silence ..... Here is my code: I run the script from here:

 echo <li><a href="" id="name_vid" name=`.$dann["adr_video"].`>`.$dann["nazvanie_video"].`</a></li>; 

 $('body').click(function(event) { if ((event.target).id == "name_vid") { // проверяем откуда мы сюда пришли и если мы пришли по кнопке 'Ответ' на вопрос, то: adr_vid = (event.target).name; document.getElementById("player").href = adr_vid; // загружаю адр. видео в href } flowplayer("player", "js/flowplayer-3.2.7.swf", // запускаю плэер { clip: { autoPlay: false, autoBuffering: true } }); }); 
 <a href='' style="display: block; width: 560px; height: 315px;" id="player"></a> 

please tell me the solution

  • Apparently, you need to initialize the player after the URL appears in href - sterx

0