Forums

/

Preview image

10 replies [Last post]

Hello, I'm playing MP4s from Amazon S3 account via CloudFront. I was looking at 3 or 4 tutorials on how to do this and eventually I got it working with this :

<div id="container">Loading the player ...</div>

<script type='text/javascript' src='http://www.mysite.com/jwplayer/jwplayer.js'></script>
<script type="text/javascript">
    jwplayer("container").setup({
        flashplayer: "http://www.mysite.com/jwplayer/player.swf",
        file: "movie.m4v",
image: "image.jpg",
        height: 360,
        provider: "rtmp",
        streamer: "rtmp://s24p94cznbw22k.cloudfront.net/cfx/st",
        width: 640
    });
</script>

This works for the movie but the preview image doesn't work. I've tried with an full URL for the image and one like the above on the Amazon server.

JW Player is great by the way. I've just got this niggling last thing I can't sort out.

Do you have a link?

Where have you placed the image? The link doesn't tell much.

For it to work you should be able to copy and paste the image location into your browser window and view it online.

You should make this line:

image: "give-up-weed-logo-for-member-movies1.jpg",

The full path to the image location on your server.

Good one, Bill

As when you take the image and then call it directly it yields a 404 error

http://www.giveupweed.com/video-course/starting-out/give-up-weed-logo-for-member-movies1.jpg

IF present then it should be displayed but in this case the error 404.

This brings me to question how the JWPlayer handles issues like this in its instantiation when an 'element' cannot be found either mistyped or not present.

Perhaps errors in the instantiation should be visually indicated.

Yes, so that is the issue.

Keep in mind - if the browser can't read the file/image, neither can the player.

Sorry guys, I thought I'd already tried that but I must have got the path wrong.

Thanks a lot. It's working now. :)

glsd to be of help

I'm using this php code to select videos dynamically. Everything works except the image does not display. The image link is correct: when I 'view source', the proper link is displayed and it works.

echo '<a name="av"></a>';
$medsp = 0;
while($avRow = mysql_fetch_array($resultAV))
{
$medsp = $i + 1;
echo '<center><p><br /><b>' . $avRow["title"] .'</b><br />' . $avRow["description"] .
'</p></center>
<div id="embedinterview">
<script type="text/javascript" src="jwplayer/swfobject.js"></script>
<div id="mediaspace' . $medsp . '">This text will be replaced</div>
<script type="text/javascript">
jwplayer("mediaspace' . $medsp . '").setup({
flashplayer: "/jwplayer/player.swf",
image: "http://www.usafaclasshistories.org/m/videothmb/' . $avRow["notes"] . '",
file: "' . $avRow["directory"] . $avRow["url"] . '",
provider: "rtmp",
streamer: "rtmp://s1kbsx2f1v5ahz.cloudfront.net/cfx/st",
skin: "/skins/glow.zip",
duration: ' . $avRow["duration"] . ',
height: 225,
width: 400
});

</script>
</div>';

@Rob - Np! :)

@Gil - Do you have a link?