Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I need to use JW Player presets on Video fields (provided by the Video module - http://drupal.org/project/video). Currently JW Player only supports the core File field. I have created a patch that allows JW Player to format the Video field as well.
The patch changes the function jw_player_field_formatter_info() (line 57, jw_player.module):
/**
* Implements hook_field_formatter_info().
*/
function jw_player_field_formatter_info() {
$formatters = array(
'jw_player' => array(
'label' => t('JW player'),
'field types' => array('file'),
'settings' => array(
'jwplayer_preset' => '',
),
),
);
return $formatters;
}
to this:
/**
* Implements hook_field_formatter_info().
*/
function jw_player_field_formatter_info() {
$formatters = array(
'jw_player' => array(
'label' => t('JW player'),
'field types' => array(
'file',
'video',
),
'settings' => array(
'jwplayer_preset' => '',
),
),
);
return $formatters;
}
I will attach the patch shortly.
Comment | File | Size | Author |
---|---|---|---|
#2 | jw_player-video_field_formatter-1807710-2.patch | 1.03 KB | cangeceiro |
#1 | jw_player-video_field_formatter-1807710-1.patch | 460 bytes | theamoeba |
Comments
Comment #1
theamoeba CreditAttribution: theamoeba commentedHere is the patch :)
Comment #2
cangeceiro CreditAttribution: cangeceiro commentedthe above patch doesn't support transcoded videos. attached is a patch that does
Comment #3
monaw CreditAttribution: monaw commentedHas these patches made it into the 2.x-dev release dated April 2013?
Comment #4
garbo CreditAttribution: garbo commentedNo, these patches haven't made it into the 2.x-dev release of april 23th.
Comment #7
pbuyle CreditAttribution: pbuyle commentedCommit c820aab and 3dd995c should provide support for Video field with transcoded video. Could any Video user confirm?
Comment #8
deanflory CreditAttribution: deanflory commentedIs this still an open issue or did the commits take care of the problem?
Comment #9
pbuyle CreditAttribution: pbuyle commentedThe commit should have taken care of this, but this has not been tested.
Comment #10
ron_s CreditAttribution: ron_s commentedThis is in 7.x-2.x. If anyone has issues with it, please post a new ticket against version 2.x. Thanks.