Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

start player in stretching = uniform??


i already added this

so.addVariable('stretching', 'uniform');

but the output is similar to stretching = none. even if the code shows uniform.

i will have to manually do a right click and select "stretching is uniform" to get the desired result.

how can we automatically set the player to uniform at all times in the stretching?

19 Community Answers

JW Player

User  
0 rated :

Post a link to your test page or your full player code.

JW Player

User  
0 rated :

I got the same problem. I will have to manually do a right click and select "stretching is uniform" to get the desired result. When the video plays in the small screen mode it got big black borders around, while it plays in the fullscreen mode properly.

I appreciate any help to that. Here is my code:

bc.. <script type="text/javascript" src="/addParam/swfobject.js"></script>

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

<script type="text/javascript">
var so = new SWFObject('player.swf','mpl','410','310','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','plugins=embed-1&duration=449 &playlistsize=1&file=/addParam/am3.xml&skin=nacht.swf&backcolor=EEEEEE&frontcolor=000000&lightcolor=000000&screencolor=000000');
so.write('player');
</script>


Further I would like to ask if anybody knows how to setup that "streching- uniform " just applying for the smallscreen mode, while for the fullscreen a "streching-non or streching-exactfit" setup is required.

Because the video has been rendered with CS3 with a resolution 720x576. When I play the video fullscreen with a 16:9 TFT display and the setting "streching-uniform", I miss pretty much of the video borders.

Thank you very much in advance!

Index

JW Player

User  
0 rated :

Thank you very much! I used the code you suggested, but the video still does not start with "Streching-uniform". As example look here:

*http://www.walkonearth.com/videos/amman_abdoun.html*

Do you have any other idea?

Index

JW Player

User  
0 rated :

Your code's good, stretching is "uniform".

Maybe "uniform" doesn't do what you expect.

Review the *stretching* behaviors here: *http://developer.longtailvideo.com/trac/wiki/FlashVars*

"uniform" will fill width or height, whichever is smaller, leaving pillar-boxing/letter-boxing.

If you still don't get the desired result, maybe your video files don't have the metadata that the player needs. Try post-processing them with FLVMDI to create and inject the metadata.

JW Player

User  
0 rated :

Thanks again. The video contains all required metadata.

Anyway, the player still not stretch "uniform", although the code is good.

it seems I have to manually do a right click and select "stretching is uniform" to get the desired result. It's a little bit unconvienend, but I dont find a solution.



JW Player

User  
0 rated :

bc.. "uniform" will fill width or height, whichever is smaller


It neither fill width nor height in my case.

JW Player

User  
0 rated :

Your player is behaving correctly.

Right-clicking on your player shows that stretching is set to uniform. If you click on that, you are changing to fill. Right-click again to see that the player has changed to fill.

Your video's native size is 720x576 which is an aspect ratio of 1.25:1. Your player's displayarea is 400x280 which is an aspect ratio of 1.43:1. If you fill the displayarea, your video will be clipped vertically.

You are seeing black bands top & bottom, *_because they are encoded into your video file._*

Look at your video in another player, such as VLC and you will see the black bands top & bottom.

You can see the black banding in this video snapshot: [img]http://willswonders.myip.org:8074/vlcsnap-2009-07-15-12h58m53s112.png[/img]
*_Note that the video snapshot is cropped horizontally, because that is the width of the Forum. Download the image file to see the full image._*

JW Player

User  
0 rated :

Yes, you are absolutly right. I've forgot to consider the aspect ratio. My fault.

Thank you for your help.

Index

JW Player

User  
0 rated :

I have the same problem, pls tel me how to auto strech my video when i start buffering

here is my complete code

<script type="text/javascript" src="swfobject.js"></script>
<p></p>
<p id="eco.flv">The player will show in this paragraph</p>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject('player-viral.swf','player','579','359','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=eco.flv&skin=modieus.swf'); s1.addVariable('stretching','uniform');
s1.write('eco.flv');
</script>

JW Player

User  
0 rated :

bc.. <scriptsrc="/addParam/swfobject.js"></script>

<divid="player"><aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheFlashPlayertoseethisvideo.</a></div>

<scripttype="text/javascript">
varso=newSWFObject('player.swf','mpl','410','310','9.0.124');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('plugins','embed-1');
so.addVariable('duration','449');
so.addVariable('playlistsize','60');
so.addVariable('file','/addParam/am3.xml');
so.addVariable('skin','nacht');
so.addVariable('stretching','uniform');
so.addVariable('backcolor','EEEEEE');
so.addVariable('frontcolor','000000');
so.addVariable('lightcolor','000000');
so.addVariable('screencolor','000000');
so.write('player');
</script>



Pleasereviewthesupportedflashvarshere:*http://developer.longtailvideo.com/trac/wiki/FlashVars*

The *stretching* value applies to normal as well as fullscreen mode. There is no setting for normal or fullscreen only. You will have to choose the best compromise.

JW Player

User  
0 rated :

i have set size 1280x720 in 16:9 aspect ratio and JW player size was 640x360 it is also under in 16:9 aspect ratio....but i have black background in left and right side now ....so what can i do.....in how can i set stretching uniform setting permanently.

Ethan Feldman

JW Player Support Agent  
0 rated :

@yeshdev – Set the stretching flashvar to exactfit. It will remove the bars.

JW Player

User  
0 rated :

hi thank you for the answer....but i know that i can set stretching flash var to exact fit but my question was how can i sat stretching in HTML file of demo with coding. dont required set stretching again and again at right click on player and select option stretching uniform. i want to do permanently set this option.

JW Player

User  
0 rated :

https://4-stagingsunosunao.com.s3.amazonaws.com/sunosunaodemos-mp4-flv/testdemo.html..........
Here is the link of preview demo that i have black bar... how can i sat stretching flash var in HTML......what is the mothered ...what is the code and what is the tags?

JW Player

User  
0 rated :

If your using the embed code, just add &stretching=(value)
after the video file / skin

Ethan Feldman

JW Player Support Agent  
0 rated :

@yeshdev – Read the response by NeoFusion720, that is what you need to do.

JW Player

User  
0 rated :

hi ............now after set stretching=exactfit my demo have removed black bar from left and right and now its running on full screen but my demo is looking very stretch now because my recorded file size is also 1280x720 in 16:9 ratio so what can i do?...

Ethan Feldman

JW Player Support Agent  
0 rated :

https://4-stagingsunosunao.com.s3.amazonaws.com/sunosunaodemos-mp4-flv/testdemo.html, looks fine to me…but it doesn’t seem that you have set the stretching though, do you have this running somewhere else now?

JW Player

User  
0 rated :

Do as following:

s1.addParam('flashvars','file=yourfile.mp4&stretching=exactfit');

OR whatever mode you want;
&stretching=fill
&stretching=none
&stretching=uniform

This question has received the maximum number of answers.