How do I configure an embed code for streaming via RTMP? I can't seem to find this info in the manual, and doing it as follows doesn't seem to work at all:

[jwplayer|config=myPlayer|file= mp4:myvideo.f4v|streamer= rtmp://my.flash.server/appName]

Thanks for any help offered...

Comments

davepotts’s picture

Also, input filter seems to work (at least in instantiating the player) when I insert it into the body of a node, but I'd like to use it in a custom CCK field for video embeds, so that I can separate text content from video content. How do I enable the filter for custom CCK fields?

JW Player’s picture

Hi Dave,

You should only need to set the file and streamer flashvars. It is not necessary to prepend the filename with mp4: when using RTMP with the JW Player.

Out of the box the module only supports the jwplayer tag in the body of nodes. To get it to work in CCK fields or themes requires the use of the theme function. An example would look something like the following:

<?php
  $flash_vars = array(
    'file' => 'your/video.mp4', 
    'image' => 'your/preview.jpg'
  );
  print theme("jwplayermodule_render_player", "your_custom_player", $flash_vars);
?>

If you have any other questions just let me know.

Thanks.

davepotts’s picture

Great, thanks! Got the basics working - although the filter doesn't seem to work with a WYSIWYG editor on the body field... plain text works fine though.

Regarding the theme function you mentioned, can you give me a little more detail as to what's going on there, or where that PHP gets set up? I've set up a custom CCK field, set it to PHP input, and entered that code as follows:

  $flash_vars = array(
    'file' => 'myfilename.f4v',
    'streamer' => 'rtmp://flashserver/appName'
  );
  print theme("jwplayermodule_render_player", "myPlayerName", $flash_vars);

Can't seem to get it to do anything but print out the code. Am I missing a step? Sorry, I'm not as up to speed on PHP as I should be ...

Thanks for the help!

JW Player’s picture

Hi Dave,

Glad to hear you have the tag working in your nodes. As for the view, how are you outputting the code?

I believe you need to call:

$field_myfield[0]['view'];

to access the parsed code.

Thanks.

davepotts’s picture

I apologize, but I'm not really a developer, and I'm not sure what you're asking... I have a custom content type where I have a CCK field (text type, input format set to PHP) called "video" separate from my normal node body.

JW Player’s picture

Hi Dave,

Sorry for the delay. I was pulled onto another project which has kept me tied up.

Do you have an update on your issue? Could I see the code you are currently using in the custom field? Perhaps including the <?php?> tags is causing the issue?

Thanks.

JW Player’s picture

Status: Active » Postponed (maintainer needs more info)