Reputation: 117
I Have this code:
<script src="http://jwpsrv.com/library/mykey.js"></script>
<div id="mediaplayer"></div>
<script type="text/javascript">
jwplayer("mediaplayer").setup({
file : '<?php echo $link_it; ?>' ,
width: 640 ,
height : 480
});
</script>
i have the link of the url in PHP... So, i use this code with a file.mp4 , but it doesn't work and tells me: File Not Found
I see in source of other website, this code:
<span class="jwmain"><span class="jwvideo">
<video src="<?php echo $link_en; ?>"></video></span>
</span>
<script type="text/javascript">
var playad = false;
var bannerad = true;
var ad_vid = "";
var width = "640";
var height = "480";
var swf = "jwplayer/jwplayer.flash.swf";
var vid = new Array();
var image = new Array();
var i = new Array();
vid[0] = "<?php echo $link_en; ?>"; // i insert php
image[0] = "img.png";
i[0] = 0;
loadplayer(0);
</script>
And it doesn't work, i wrong how i use it probably... How i can to see my file .mp4? There are other player ? so, i use JW6.9
Upvotes: 1
Views: 302
Reputation: 4201
Try this.
Under this line of code:
file : '<?php echo $link_it; ?>' ,
Add this line:
type: 'mp4',
Does that help?
Upvotes: 0
Reputation: 885
You print php code instead of execute it, please replace
<script type="text/javascript">
jwplayer("mediaplayer").setup({
file : '<?php echo $link_it; ?>' ,
width: 640 ,
height : 480
});
</script>
with:
<script type="text/javascript">
jwplayer("mediaplayer").setup({
file : <?php echo "'". $link_it ."'" ; ?>' ,
width: 640 ,
height : 480
});
</script>
Upvotes: 2