crmamx Posted March 28, 2011 Share Posted March 28, 2011 I have just rewritten my site from strictly html to a php system. All the programs are called from index.php. With the old code the html program calls a .flv program and it works perfect. With the new code the html program extension is changed to .php and I can't get it to do anything except display the error code written in the program. <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1252"> <title>AVS FLV Player</title> <!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ --> <script type="text/javascript" src="swfobject.js"></script> </head> <div id="flashcontent"> <strong style="font-size: large;">The contents of the page could not be displayed.</strong> <br> <br> This can be caused by the following reasons: <ul> <li>Microsoft Internet Explorer blocks the flash content on your page. <br> Click the warning in the upper part of the browser and select the <strong>Allow Blocked Content... </strong> option to continue opening the page. <br> <br> </li> <li><strong>You need to install or upgrade your Flash Player.</strong> <br> Please visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe site</a> to download and install the latest version of the Flash Player necessary to be able to display the contents of this page </li> </ul> </div> <script type="text/javascript"> var so = new SWFObject('avs4you_player.swf', 'player', '450', '370', '7', "#ffffff"); so.addParam("allowScriptAccess","always"); so.addParam("allowFullScreen","true"); so.addParam("wmode", "window"); so.addParam("scale", "noscale"); // this is the name of the converted file that will be played by the player so.addVariable("file", "content/pages/video_f86.flv"); // here the size of the player itself is set in pixels - width and height so.addVariable("width", "450"); so.addVariable("height", "370"); // the name of the player skin so.addVariable("theme", "Platinum.swf"); // the movie loop parameter - can be set to 0 (the video will stop after the playback is over) or 1 (playback is looped) so.addVariable("repeat", "0"); // the movie automatic startup parameter - can be set to 0 (the playback will not start automatically once the page with the video is loaded) or 1 (autostart) so.addVariable("autostart", "0"); // the name and path of the image that will be displayed when the page is loaded, provided that the autostart value is set to 0 (i.e. no autostart is enabled) so.addVariable("image", ""); // the volume that will be used to playback your movie so.addVariable("volume", "50"); so.addVariable("scaleonresize", "none"); // the top and the bottom captions displayed when you roll your mouse cursor over the player window so.addVariable("top_caption", " "); so.addVariable("bottom_caption", " "); so.addVariable("showlogo", "0"); so.addVariable("v", getQueryParamValue("v")); so.write("flashcontent"); </script> </body> </html> [code] Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/ Share on other sites More sharing options...
crmamx Posted March 28, 2011 Author Share Posted March 28, 2011 Update: I changed the path and now I don't get the error message, just a blank screen. <script type="text/javascript" src="content/pages/swfobject.js"></script> Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1193216 Share on other sites More sharing options...
Adam Posted March 28, 2011 Share Posted March 28, 2011 When you say "error code written in the program" - do you mean the HTML you posted below is literally shown as the web page? If so I'd guess you don't have Apache and/or PHP installed and/or running correctly. Edit After seeing your new post I can't understand your problem. Can you try explaining it a little better? What error in what "program" are you referring to seeing (before)? What errors do you get in the error console? etc. Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1193217 Share on other sites More sharing options...
KevinM1 Posted March 28, 2011 Share Posted March 28, 2011 For the correctness of terminology, HTML pages aren't a program. Neither HTML nor CSS contain any logic. Instead, they're simply documents with special formatting instructions that a browser can read and use. PHP apps are generally called scripts because they're not usually compiled. They're interpreted by the PHP engine which is running on the web server. This should help you explain your problem a bit better. Also, you may want to tell us your directory structure as changing your JS path seems to have done something. Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1193223 Share on other sites More sharing options...
crmamx Posted March 28, 2011 Author Share Posted March 28, 2011 When you say "error code written in the program" - do you mean the HTML you posted below is literally shown as the web page? If so I'd guess you don't have Apache and/or PHP installed and/or running correctly. Edit After seeing your new post I can't understand your problem. Can you try explaining it a little better? What error in what "program" are you referring to seeing (before)? What errors do you get in the error console? etc. When I said error I was referring to this part of the html code was being displayed: The contents of the page could not be displayed This can be caused by the following reason Microsoft Internet Explorer blocks the flash content on your page. ect., ect. But now the message is not being displayed because I changed the path. It just displays a blank screen, no errors, no messages. I deleted the old programs from the server but locally it still works. I have: video_f86.html video_f86.swf swfobject.js File structure: web page files - html videos - swf and js In the new system I have: index.php menu2.php video_f86.php - I just removed DOCTYPE from the html code video_f86.swf swfobject.js File structure public_html - index.php content - menu2.php pages - other 3 programs part of index.php <div id="leftmenu" class="grid_3"><?php include('content/menu2.php'); ?></div> part of menu2.php <li> <a href="#">Videos</a> <ul> <li> <!-- <a href="http://www.bayarearcsociety.com/content/pages/video_f86.flv">F 86</a> --> <a href="index.php?page=video_f86">F 86</a> </li> ect., ect. As a sidenote I was able to get all my slideshows to work by changing the paths and inserting the code in menu2.php Hope this explains it. Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1193245 Share on other sites More sharing options...
crmamx Posted March 31, 2011 Author Share Posted March 31, 2011 I've made some progress after hours of work. I got the video player to load in the window but the video program won't load. So I think that rules out the javascript. I have used basically the same code with my slideshows and they work fine. Rather than pasting tons of code I think it would be easier to look at what's happening and use view/source and/or firebug. If one of you can't spot it I guess I will just have to give up on videos. http://bayarearcsociety.com Also, if you go here you can see it work with my old code: http://bayarearcsociety.com/index.html Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195298 Share on other sites More sharing options...
cssfreakie Posted April 1, 2011 Share Posted April 1, 2011 I have a feeling that you are changing the location of the video's... can you put your videos in the exact same folder as the swfplayer and tell us exactly the location if you change it Besides that it's nice for people here to know that your old site where it seems to work is http://bayarearcsociety.com/index.html and your new site where it doesn't work is http://bayarearcsociety.com/index.php Now on your new site the player loads perfectly, so what seems to be wrong is the location to the video, or some other freaky param in the flash vars. Your player is in http://bayarearcsociety.com/content/pages/avs4you_player.swf But your videos are clearly not inside that folder although you are linking to them in the script... Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195347 Share on other sites More sharing options...
crmamx Posted April 1, 2011 Author Share Posted April 1, 2011 I have a feeling that you are changing the location of the video's... can you put your videos in the exact same folder as the swfplayer and tell us exactly the location if you change it Besides that it's nice for people here to know that your old site where it seems to work is http://bayarearcsociety.com/index.html and your new site where it doesn't work is http://bayarearcsociety.com/index.php Now on your new site the player loads perfectly, so what seems to be wrong is the location to the video, or some other freaky param in the flash vars. Your player is in http://bayarearcsociety.com/content/pages/avs4you_player.swf But your videos are clearly not inside that folder although you are linking to them in the script... I have not been moving the files but I have been changing the paths in the programs. Can't get any combination to load the movie although it is loading the player. There appear to be 5 files involved: video_b52.flv video_b52.php swfobject.js avs4you_player.swf Platinum.swf They are all in the same folder: public.html/content/pages Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195367 Share on other sites More sharing options...
cssfreakie Posted April 1, 2011 Share Posted April 1, 2011 http://bayarearcsociety.com/content/pages/video_b52.flv there is no such file in that folder Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195490 Share on other sites More sharing options...
crmamx Posted April 1, 2011 Author Share Posted April 1, 2011 http://bayarearcsociety.com/content/pages/video_b52.flv there is no such file in that folder You are right as per usual. But it is there now and same result. I can't figure it out. If you do I am going to start a campaign to promote you to "Super Guru.".. Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195533 Share on other sites More sharing options...
cssfreakie Posted April 1, 2011 Share Posted April 1, 2011 haha please don't I was already flabbergasted to be a normal one there are loads of others that deserve more credits. \I'll have a look at your thing Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195549 Share on other sites More sharing options...
crmamx Posted April 1, 2011 Author Share Posted April 1, 2011 Halleluiah..... :D I got it to work!!!! video_b52.php is called from menu2.php with: <a href="index.php?page=video_b52">B 52</a> Then the path for Platinum.swf, swfobject.js, and avs4you_player.swf is: content/pages Howsomeever, the video is just: so.addVariable("file", "video_b52.flv"); I don't understand it. But it works. And I can't get it to work with the video in any other folder. Quote Link to comment https://forums.phpfreaks.com/topic/231949-video-wont-play/#findComment-1195676 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.