2

I am adding a flvplayer runtime. When i am adding it on runtime it is not working but after reloading the page it is working fine.

Please take a look at my php and html code:-

function crete_template(record){
{
var tpl ='<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="328" height="200">'+
                            '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                            '<param name="allowfullscreen" value="true" />'+
                            '<param name="allowscriptaccess" value="always" />'+
                            '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                            '<object type="application/x-shockwave-flash" data="<?php echo JSPATH;?>player/player.swf" width="400" eight="200">'+
                                '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                                '<param name="allowfullscreen" value="true" />'+
                                '<param name="allowscriptaccess" value="always" />'+
                                '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                                '<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>'+
                            '</object>'+
                        '</object>';
return $(tpl);
}

i am putting the whole html part into a div dynamically.

I am using this player

I think my "player/player.swf" file is not loaded in runtime. If question is not clear please ask me and help me.

2
  • provide runable demo of your code. which will help to get quick answer. Apr 4, 2014 at 6:50
  • @DipaliVasani thnkx for replying i have added the whole function that i have called on runtime.
    – Bik
    Apr 4, 2014 at 6:54

1 Answer 1

0
function crete_template(record){
{
var tpl ='<object type="application/x-shockwave-flash" data="<?php echo JSPATH;?>player/player.swf" width="400" height="200">'+
                            '<param name="movie" class="movie" value="<?php echo JSPATH;?>player/player.swf" />'+
                            '<param name="allowfullscreen" value="true" />'+
                            '<param name="allowscriptaccess" value="always" />'+
                            '<param name="flashvars" value="file=<?php echo UPLOAD_PATH; ?>'+record.video_file+'" />'+
                            '<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>'+
                        '</object>';
return $(tpl);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.