Jump to content

Video won't play


crmamx

Recommended Posts

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

 

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

Halleluiah..... :D :D :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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.