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

Forums

/

Using a preview image breaks video playback in 4.2

21 replies [Last post]

I'm having an issue where I cannot specify an &image= for the JW player 4.2 embedded in my GWT web application. When I do specify a preview image, the preview will show (although not properly scaled), but when you go to click play the spinner image just sits as if it is buffering (but it is not). It does not matter what video I try, the same problem occurs. Using these same parameters in the Setup Wizard works fine.

When I remove the preview image flashvar, video plays just fine. Does anyone know what could be causing this problem with using a preview image? Before I submit this as a bug I thought I'd ask to see if anyone has similar problems

Too many guesses cause brain freeze. Can you post your player code or a link to your test page so someone can have a look?

One more thing: Whenever I use a preview image, I must click the play button twice before it attempts to play. When I dont use an image, the first click plays as it should..

@kLink: My app is written in GWT, but the JW player embed portion code essentially just compiles down to this:

<script type="text/javascript">
var so = new SWFObject('player.swf','mpl','640','380','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=http://videos.handbeam.s3.amazonaws.com/8a007671-4d3a-47b7-bb56-53e52e15a439/null/1226351701801_1217...');
so.write('player');
</script>

I've also tried a standard HTML embed (not using SWFObject) and the same problem exists. Any suggestions? Help is appreciated..

The double-click shouldn't be happening. Something else must be taking the mouse focus. Do you have other scripts loading on the page?

I think I'd try using swfobject v2.1 from: http://code.google.com/p/swfobject/ since it does a much better job of generating the embedding code and takes care of embedding Flash at the appropriate time during the page load. Put this in the head element of your page.

    <script type="text/javascript">
      var flashvars =
      {
        file:               'http://videos.handbeam.s3.amazonaws.com/8a007671-4d3a-47b7-bb56-53e52e15a439/null/1226351701801_12179.mp4',
        image:              'http://videos.handbeam.s3.amazonaws.com/8a007671-4d3a-47b7-bb56-53e52e15a439/null/1226352036332_17478.jpg'
      };

      var params =
      {
        allowfullscreen:    'true',
        allowscriptaccess:  'always'
      };

      var attributes =
      {
        id:                 'mpl',
        name:               'mpl'
      };

      swfobject.embedSWF('player.swf', 'player', '640', '380', '9.0.124', false, flashvars, params, attributes);
    </script>

If that doesn't help, ask on the swfobject discussion group: http://groups.google.com/group/swfobject They're the geniuses who figured this out.

I am having the exact same problem, also using the latest JW player 4.2.95
The stretching of the preview images won't work and the player won't play any
flv files from on my own server.

The player does play Youtube videos.

Any fixes for this?

Greets

@wessite,

Post your code or a link to your test page. Guessing is a waste of everyone's time.

Thanks for the reply.

Here's my code:

<script type="text/javascript">
var so = new SWFObject('http://video.mysite.com/player.swf?videoid=3789','mpl','462','380','9','#ffffff');
so.addParam('wmode','transparent');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.write('mediaspace');
</script>

I also hardcoded the player.swf by editing the "player.as" file changing the line:

file:undefined, => file:'http://video.mysite.com/playlist.xml?videoid=' + root.loaderInfo.parameters.videoid,

so it loads the playlist by videoid, here's an example of a playlist with youtube video:

<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>Mark Mulville in Pittsburg</title>
<location>http://www.youtube.com/watch?v=XzxLWduPzCU</location>
<info>http://mysite.com/videos/mark-mulville-in-pittsburg</info>
<image>http://i.mysite.com/videopics/3789.jpg</image>
</track>
</trackList>
</playlist>

example of normal playlist with flv video on my server:

<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>Sifiso Nhlapo Crash Video</title>
<location>http://i.mysite.com/videos/men-crash.flv</location>
<info>http://mysite.com/videos/sifiso-nhlapo-crash-video</info>
<meta rel="type">flv</meta>
<image>http://i.mysite.com/videopics/3778.jpg</image>
</track>
</trackList>
</playlist>

Any suggestions are welcome...

from - http://code.jeroenwijering.com/trac/wiki/FlashVars

type (undefined):
type of file, can be sound, image, video, youtube, camera, http or rtmp. Use this to override auto-detection

from - http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

If FLV playback doesn't work on your site which runs off an IIS server, the FLV mimetype isn't added to the server. Please contact your webserver administrator on this.
(if you're an admin, here's how to fix it - http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19439 )

Thanks for the reply anderson, I have changed the type to video but still no go...

playlist looks like:

<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>Sifiso Nhlapo Crash Video</title>
<location>http://i.mysite.com/videos/men-crash.flv</location>
<info>http://mysite.com/videos/sifiso-nhlapo-crash-video</info>
<meta rel="type">video</meta>
<image>http://i.mysite.com/videopics/3778.jpg</image>
</track>
</trackList>
</playlist>

The video does seem to play when I remove the image tag in the playlist, weird...

Unfortunately I dont think this is just an issue with SWFObject as the problem still occurs when I simply embed the player in HTML.

The player requires 2 mouse clicks to begin playing only when the preview image is visible. When it is not (like when paused), all other clicks respond immediately. Press stop to bring up the preview image again, and 2 clicks are needed again however.

I've made sure that nothing else is stealing mouse focus away from the player. But the problem does not occur when not specifying a preview image so I dont think its a focus issue outside of the player.

Does anyone have a link to an old version of JW player I could try?

all old players can be found here (bottom of page) - http://code.jeroenwijering.com/trac/

but please also try with an unmodified version of the current player version !

also please note this from - http://www.jeroenwijering.com/?item=Embedding_Flash

The third problem relates to the three symbols ?, = and &. Since they are used to stack the flashvars, they cannot be used in the flashvars themselves. By escaping these vars, the problem can be solved. Therefore, replace the three symbols with their escaped strings and unescape() them again in the SWF:

? → %3F
= → %3D
& → %26

I've tried the previous versions, and it appears like I'm only having this problem with the 4.2 release. All previous releases do not have the problem. Not sure why this is the case, but its not a big deal as I can just use 4.1 and everything works perfectly. Thanks everyone for the help.

Trying to reproduce this on my blog I ran into the following

The problem is not with 4.2.90 which is used on http://www.jeroenwijering.com/?item=JW_FLV_Media_Player

But it is with the version from the download page which is a 4.2.95

See http://build2be.com/en/content/jwplayer-42 with 4 video's. What I don't understand is why?

The video combi with the 4.2.95 player from blip.tv is in error. But the same player with a video from this site is not in trouble.

I'm also experiencing this problem. Using the JW FLV player with right side playlist dowloaded from the setup wizard. Also pulled the atom+media xml playlist directly from the supported file formats page. Everything works fine with this combo on my server (excerpt):

<entry>
<title>Big Buck Bunny - FLV Video</title>
<link rel="alternate" href="http://www.bigbuckbunny.org/" />
<summary>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</summary>

<media:credit role="author">the Peach Open Movie Project</media:credit>
<media:content url="http://www.jeroenwijering.com/upload/bunny.flv" type="video/x-flv" duration="33" />
</entry>

<entry>
<title>Big Buck Bunny - MP3 Audio with thumb</title>
<link rel="alternate" type="text/html" href="http://www.bigbuckbunny.org/" />
<summary>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation. Like the foundation's previous film Elephants Dream, the film is made using free and open source software.</summary>

<media:group>
<media:credit role="author">the Peach Open Movie Project</media:credit>
<media:content url="http://www.jeroenwijering.com/upload/bunny.mp3" type="audio/mpeg" duration="33" />
<media:thumbnail url="http://www.jeroenwijering.com/upload/bunny.jpg" />
</media:group>
</entry>

I then replace the 'media: content url' with a video of my own (H.264 in a MP4 shell). That plays fine, even with the 'type' still set to 'flv'. So far so good.

Then I copy the thumbnail code <media:thumbnail url="http://www.jeroenwijering.com/upload/bunny.jpg" /> from the second entry and paste it into the first (above). The thumbnail appears fine and when clicked my video plays correctly.

Finally, I replace the .jpg thumbnail image with the same size jpg on my own server. Now the new thumbnail image appears, but the video will not play at all. The same thing happens when I put the original 'bunny.jpg' file on my own server - the video will not play. So I don't think it's a jpg encoding issue (not using progressive jpg's btw).

Any thoughts?

[READ UPDATE BELOW FIRST] OK, some more info. I'm using version 4.2.95 of the JW FLV player. While experimenting I found that when I load the page with my thumbnail in place, I can't start the video at all by clicking on the preview, start button, thumbnail or description, BUT when I click on the sample .mp3 file or the .png file that were included in the atom+media xml file they will play, and when they are playing, if I click on the thumbnail or description or my video in the playlist it WILL start playing automatically. I would presume this has something to do with the actionscript in the swf autoplaying when the thumbnail is clicked. I have autoplay turned off for the main video on pageload.

I also added a crossdomain.xml file to my site just in case, since that was the only load error the page threw, but this didn't seem to make any difference.

Also to clarify, I don't have the two-click to play problem, my player just won't play when there's a thumbnail/preview image being pulled from my server.

[UPDATE] I've figured out my issue, humble apologies - this was my goof. After much head-banging, it seems another developer here was using the player in the same basic configuration as I was and my test page was loading his .swf file (with my .xml playlist) instead of the one I configured. I'm not sure exactly why the thumbnails from my .xml file worked and the videos didn't, but there must have been a difference in the players' configuration?

Anyway all is working well now. Sorry to bother with this!

I'm having the exact same problem, clearly there is a bug, however I did was Clemens suggested above and used 4.2.90 http://code.jeroenwijering.com/trac/browser/tags/mediaplayer-4.2?rev=90 and it works find for me.

I can as well confirm this, I tested it with the setup wizard (which is still at rev 90) and a image from Amazon S3 works perfect, but with rev 95 it throw some crossdomain.xml error and the player seems didn't showing the video... It has nothing to do with escape or rawurlencode, I tested all combination...

Had the same problem with 4.2.95. Switched to 4.2.90 and all is well.

Very simple implementation as follows;

<script type="text/javascript" src="/sound/embed/swfobject.js"></script>

<div id="player">This text will be replaced</div>

<script type="text/javascript">
var so = new SWFObject('/sound/embed/player.swf','mpl','470','260','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&image=/pix/play/choruschat.jpg&file=http://podcast.sfopera.com/flashvideo/chorus/Chorus_Chat_hi.mp4');
so.write('player');
</script>

[SOLVED]
I have the exact same issue, i narrowed things down to be related to crossdomain , if everything is loaded from same domain there is no problems, as soon as I mix domains from where the swf, thumbnail and flv is loaded I get problems.

I solved it now by creating a crossdomain.xml on the server hosting the thumbnails as well.

Adding crossdomain.xml on the server hosting the images worked for me too.

After a bunch of head ache (playing with multiple versions of 4.1, 4.2. and 4.3) since initially I did not think the crossdomain.xml worked, I went back and put crossdomain.xml's all over the place, and it did fix the problem. I just needed to put it in a couple of different document roots of multiple sites, and then I was in good shape. Thank goodness. I did not want to be stuck without a future upgrade path...

hi

im having this problem on our site... it has not happened with any other players exept for 4.2.95

Im using swfobject 2.1

var params = {};
params.allowfullscreen = true;
params.allowscriptaccess = 'always';

var flashvars = {};
flashvars.file = domain+'/assets/media/flash/flv/Intro.flv';
flashvars.image = domain+'/assets/media/images/introPrev.jpg';
flashvars.link = domain+'/services/online-video/';
flashvars.height=180;
flashvars.width=625;
flashvars.controlbar='none';
flashvars.frontcolor='FFFFFF';
flashvars.lightcolor='FFFFFF';
flashvars.screencolor='FFFFFF';
flashvars.volume=80;
swfobject.embedSWF(shared+"/flash/mediaplayer.swf",'flashbanner',"625","180","9.0.0",shared+"/flash/expressInstall.swf",flashvars,params);

the vars in there shared and domain both have crossdomain.xml. If i remove the image preview... everyting work as expceted. As soon as the image preview is put in, then i have a double click to get the player to play.. but nothing comes up. Jus the Buffering logo.

There are no other instances of the JW Player on this page.

Looking at the firebug, i cannot see any attempt to load the Intro.flv.

Any help is greatly appreciated.