Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Please help me emebed / load .flv from a CDN

6 replies [Last post]

Hello there,

I was hoping someone on this forum could please help me with one specific problem that I am having. I would like to embed the JW longtail player into an html page, and then load the video from a service that has the streaming video provided.

I have tried using the setup wizard on this site, but when I link to the video, there is a "#2048" error.

Tghis is the context of the situation...

We have created a site that was to be used on a showroom floor ( no internet connection) and loaded the .flv videos at the local root level.

Now however, we would like to be an online site. I have been able to use the jw player to load videos to play using the shadowbox javascript, but when I try to embed it onto a page and have it play, it isn't working and I am not sure why.

Below is the code that is currently working to load the videos on the local root level.

Might someone have any ideas on what I need to replace to have it load the videos from the streaming service?

I would greatly appreciate any assistance that could be provided.

<script type="text/javascript" src="swfobject.js"></script>
                                <script type="text/javascript">
swfobject.registerObject("player1","9.0.98","expressInstall.swf");
</script>
                                <object id="player1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="640" height="380">
                                  <param name="movie" value="player.swf" />
                                  <param name="allowfullscreen" value="true" />
                                  <param name="allowscriptaccess" value="always" />
                                  <param name="flashvars" value="file=assets/videos/Bob_Peebler.flv&image=images/videoStatic_Peebler.jpg" />
                                  <object type="application/x-shockwave-flash" data="player.swf" width="640" height="380">
                                    <param name="movie" value="player.swf" />
                                    <param name="allowfullscreen" value="true" />
                                    <param name="allowscriptaccess" value="always" />
                                    <param name="flashvars" value="file=assets/videos/Bob_Peebler.flv&image=images/videoStatic_Peebler.jpg" />
                                    <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
                                  </object>
                                </object>

 
One of the many Adobe Flash Player security restrictions, is that an offline player can only load offline files/an online player can only load online files.

So you have to use an online player to load the online file.

Instead of player.swf, you need http://www.domain.com/path/player.swf.

Adjust the domain and path to the location of the Flash movie on your server.

Thanks for the reply lost!

That sort of makes sense, but I just need a little clarification....

So to get this to work, I will need to load my "player.swf" onto the same hosting service where the videos are located, but I will then use the object / embed code for the player and video located on the site correct?

Might you have an idea on how to embed the player from the web using the correct paramater in the embed code?

Right now it's simply
<param name="movie" value="player.swf" />

would the "value" change to an http:// address for it then?

Sorry for asking, but I am very naive about flash embedding correctly and would appreciate any possible assistance provided.

A complete HTML document would look like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>

  <head>

    <title>Swiss - JWMP v4.6.x - swfobject v2.2</title>

    <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

    <script type="text/javascript">
      swfobject.registerObject('player1', '9.0.124', 'http://www.domain.com/path/expressInstall.swf');
    </script>

  </head>

  <body>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="player1" name="player1" width="640" height="380">
      <param name="movie"             value="http://www.domain.com/path/player.swf" />
      <param name="allowfullscreen"   value="true" />
      <param name="allowscriptaccess" value="always" />
      <param name="flashvars"         value="file=http://www.domain.com/path/assets/videos/Bob_Peebler.flv&image=http://www.domain.com/path/images/videoStatic_Peebler.jpg" />
      <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="http://www.domain.com/path/player.swf" width="640" height="380">
          <param name="allowfullscreen"   value="true" />
          <param name="allowscriptaccess" value="always" />
          <param name="flashvars"         value="file=http://www.domain.com/path/assets/videos/Bob_Peebler.flv&image=http://www.domain.com/path/images/videoStatic_Peebler.jpg" />
      <!--<![endif]--> 
      <p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
      <!--[if !IE]>--> 
        </object> 
      <!--<![endif]--> 
    </object>

  </body>

</html>

Be sure to change the domain and path in 7 places.

Word. Thanks so much lost, I'll give it a shot.

lost, you are a scholar among gentlemen. Thank you so much, I got it to work with your help!

 
It's wonderful to hear that it works for you!

    Good Luck!