$node->flvmediaplayer_display is only added to the node if 'Display player in node body' is set to TRUE. So, If I set it to true, the player is embeded in the node, which means that if I then use $node->flvmediaplayer_display in my theme to display the player, I end up with the player displayed twice (actually, for some reason the player itself only displays once, but the embed fieldset does show twice).

If I set 'Display player in node body' to FALSE, $node->flvmediaplayer_display is not assigned to the node and I have no way of accessing it.

Attached patch unconditionally assigns the player to $node->flvmediaplayer_display, regardless of the setting of the 'Display player in node body' setting.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MatteNoob’s picture

Hi,
I tried running the patch. This is how I tried:

1. I placed your patch in the same directory as the module
2. I logged into SSH, cd into the folder and sent this command: "patch flvmediaplayer.module < flvmediaplayer-player-for-themers.patch"
It returned:

patching file flvmediaplayer.module
Hunk #1 FAILED at 126.
Hunk #2 FAILED at 638.
2 out of 2 hunks FAILED -- saving rejects to file flvmediaplayer.module.rej

I also wonder if $node->flvmediaplayer_display takes any agruments, please.

Thank you for your time. I would love to be able to print its position like this, sir.

arthurf’s picture

Status: Needs review » Fixed

This is a patch based off an older version of flvmediaplayer. The concepts of this have already been encoperated into the current head version.

$node->flvmediaplayer_display does not take arguments. It is a container for the player, it is not a function. If you want to render a player with parameters:

print theme('flvmediaplayer_render_player', $player_path, $params, $flashvars);

If you want to render a player from a node (will only display if there is valid data):

print theme('flvmediaplayer_node_display', $node, $profile, $params, $teaser);

MatteNoob’s picture

Status: Fixed » Needs review

Hello,
Thank you for your swift reply.

I have a node with a video in it. The video is always added to the bottom of the node. I'd like to place it anywhere within the node body. I've got php parsing turned on. The video is also working in this node (when displayed in the bottom).

----

1. Now, If I add:

print $node->flvmediaplayer_display;

the player is not rendered inside the node.

2. If I use

print theme('flvmediaplayer_node_display', $node, 'video_1024', array(), null);

the player is not rendered inside the node. I am also not sure about what the $teaser variable is for. I searched the source of the module for the flvmediaplayer_node_display function, but I did not have any success finding it.

----

Does anyone have any idea what I'm doing wrong. If I haven't made what I want to do clear, I just want to be in control of where in the node body I'd like the player to be displayed with the profile I've assigned to the node type.

Mike Serafin’s picture

Is there a fix for this now? My videos are always playing at the bottom. Might be related, but where ever I put [flvmediaplayer], all it does is display [flvmediaplayer] verbatim and not the video. It just adds the video to the bottom of the node.

edit: here's a sample page: http://drleeonhealth.com/content/afternoon-snacks-work