video not displaying when playing in jwplayer 6

sluglord

New Member
I am using Jwplayer 6 to display videos. Now each video I have is stored in the \[code\]VideoFiles\[/code\] directory. What happens is I click on a hyperlink which is below and it will open up a new page:\[code\]return '<a href="http://stackoverflow.com/questions/14555196/previewvideo.php?filename='.$filename.'" title="Click to view in New window" target="_blank">'.htmlspecialchars($filename).'</a>'\[/code\]so if the hyperlink file name is \[code\]sample_mpeg4_5.mp4\[/code\], then the url it shows when new page is open is thisNow you can see that it displays a video player, but if you click on the play button, it does not play the video which is in \[code\]VideoFiles/sample_mpeg4_5.mp4\[/code\].What I do try and retrieve the video is below but my question is how can I get the video to play in the video player?\[code\]<head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>Preview Video</title> <script type="text/javascript" src="http://stackoverflow.com/questions/14555196/jquery/jquery-1.7.min.js"></script> <script type="text/javascript" src="http://stackoverflow.com/questions/14555196/jquery/jwplayer.js"></script> <script type="text/javascript" src="http://stackoverflow.com/questions/14555196/jquery/jwplayer.html5.js"></script></head><body><?php$getvideo = 'VideoFiles/' . $_GET['filename'];$videoquery = "SELECT VideoFile FROM Video WHERE (VideoFile = ?)"; if (!$videostmt = $mysqli->prepare($videoquery)) { // Handle errors with prepare operation here}// Bind parameter for statement$videostmt->bind_param("s", $getvideo);// Execute the statement$videostmt->execute(); if ($videostmt->errno) { // Handle query error here }$videostmt->bind_result($dbVideoFile); $videostmt->fetch(); $videostmt->close(); ?><div id="myElement">Loading the player...</div><?php echo 'This is the videoPath '.$dbVideoFile; ?><script type="text/javascript"> jwplayer("myElement").setup({ file: "<?php echo $dbVideoFile; ?>", });</script></body>\[/code\]UPDATE:How come some people can see the video display but I can't? I tested it on my ipad and it works. What do I need to check to see if it works on my computer? What could I be missing? It works on safari in ipad but not safari on my laptop
 
Back
Top