The actual embedding of a JW Player™ into a Node body is controlled by the tagging system. The tagging system is quite flexible and allows for varying levels of complexity in your embedding.
The basic syntax for the tagging system is as follows:
[jwplayer|param1=value1|param2=value2|…]]
This means that the simplest case would be to simply type [jwplayer] into your node body. Without specifying any parameters the module will use the default player settings and attempt to use the first attached piece of content present on the node. Attaching content to your node will be covered later.
In most cases there are three parameters that you will likely always use and are as follows: config, file and image. The config parameter refers to a specific Player that you have configured. The content you wish to play is identified by the file parameter and the static image you wish to use is set by the image parameter. So a typical embed will take the following form:
[jwplayer|config=myplayer|file= http://www.mywebsite.com/myvideo.flv|image= http://www.mywebsite.com/myimage.jpg]
In the interest of clarity the tagging system supports the use of newlines as well. So the above tag can be rewritten in the following form:
[jwplayer |config=myplayer |file=http://www.mywebsite.com/myvideo.flv |image=http://www.mywebsite.com/myimage.jpg]
In this case URLs are being used to specify where the content is located.
If you wish to give users the ability to upload video content during the creation of a node, activate the core Drupal Module called Upload. This allows users to upload files as attachments to a node. The tagging system has the capability of referencing these attached files instead of using URLs. For each embedded player set the file and image parameters to the description value fo r the attachments that you wish to use. Attachment descriptions can contain spaces and the tagging system supports this. In order to use the attachments in the above image the embed tag would look like the following:
[jwplayer |config=myplayer |file=test_video |image=test_image]
In addition to the three primary parameters you can also specify any number of flashvars. This gives you the flexibility of having node specific players without creating a new Player. Perhaps the most useful aspect of specifying flashvars at embed time is the fact that you can use them in conjunction with a Player configuration and they will override the settings specified by the Player you’re using. This allows you to take advantage of an existing Player but make a slight adjustment for a special case. A complex embed would look like the following:
[jwplayer |config=myplayer |file=http://www.mywebsite.com/myvideo.flv |image=http://www.mywebsite.com/myimage.jpg] |backcolor=000066 |frontcolor=3333FF |lightcolor=FFCC00]
In this case the color of the player has been customized. Again, even if the “myplayer” Player specified colors, the colors defined in the tag will take precedence.