Hi Rob,
thanks for this nice module which I just installed for use with embedded media field. It works fine. But there is a little feature missing which is very importand for use this module together with emfield: The Scale Property of Flowplayer is default set to "scale" which means that the video is scaled to the window size. When viewing a video in full screen mode the video is stretched/distorted to the aspect ratio of the monitor, same happens when a video does not fit to the dimensions defined in embedded media field configuration. Setting the clip-option "scaling:fit" avoid this problem.
I've added the option to select scaling from the admin form. Could you please please put this to your Code. Sorry I'm not that professional coder to provide a patch.
best regards
Jürgen Brocke
added to flowplayer.admin.inc Line 20:
// add option for scaling property
$form['flowplayer_scaling'] = array(
'#type' => 'select',
'#title' => t('Scaling'),
'#options' => array(
'fit' => t('fit to window'),
'half' => t('half size'),
'orig' => t('original size'),
'scale' => t('scale'),
),
'#description' => t('The <a href="!options">Scaling-Property</a> for the video:<ul><li>fit: Fit to window by preserving the aspect ratio encoded in the video metadata.</li><li>half: Half-size (preserves aspect ratio)</li><li>orig: Use the dimensions encoded in the file. If the video is too big for the available space, the video is scaled using the fit option.</li><li>scale: Scale the video to fill all available space. Ignores the dimensions in the metadata. This is the default setting.', array('!options' => 'http://flowplayer.org/documentation/configuration/clips.html')),
'#default_value' => variable_get('flowplayer_background_gradient', 'scale'),
);
added to flowplayer.module Line 124:
// Merge scaling option in the defaults
$scaling = variable_get('flowplayer_scaling', NULL);
if (!empty($scaling)) {
$config[clip]['scaling'] = $scaling;
}
added to flowplayer.install Line 15:
variable_del('flowplayer_scaling');
Comments
Comment #1
prodigal_son commentedThank you very much for these modifications Jürgen. Worked perfectly for our site.
-Julius
Comment #2
robloachThanks! http://drupal.org/cvs?commit=243932
Comment #4
ñull commentedThere is a little bug as it uses the wrong variable_get. Attached a patch that corrects it and works fine here.
Comment #5
robloachYup! Thanks a lot for the help. I'll commit this today.
Comment #6
robloachGreat! Good find. http://drupal.org/cvs?commit=287080
Comment #7
ñull commentedCould you please commit my wmode feature patch too.
Comment #8
robloachFor sure! We'll talk about it in #529036: Option to control "wmode" :-) .
Comment #9
jbrown commentedWe should default to 'fit'.
All the other options are incorrect anyway.
Comment #10
jbrown commentedComment #11
robloachAlthough the Flowplayer scaling documentation lists "scale" as the default, "fit" makes more sense, otherwise it ignores the aspect ratio and we end up with oddly shaped videos. Thanks Jon!
http://drupal.org/cvs?commit=326566
http://drupal.org/cvs?commit=326574
Comment #13
keti-1931 commentedis there any plans for drupal 7 i m facing same issue in IE