Bas Flvplayer

This plugin enables you to stream videos with Textpattern.
http://samisdat.org/textpattern/index.php
Txp › s a m i s d a t . o r g › Bas Flvplayer

bas_flvplayer uses the txp file-system for the videos as well as for the player.

The Videos are played with a flashplayer:
The Flvplaer by Jeroen Wijering.

Note: The Flvplayer is licensed unter Creative Commons BY NC SA. Make sure, that you contact Jeroen before you use his player in a commercial project!

The player will be embedded XHTML-conform and i tested successfully the plugin with IE, Firefox and Opera.

You will need a .flv encoder, because the player streams only this format.
At rivavx.com a free encoder is avaible..

bas_flvplayer is based on bas_emff. You will notice that if you have a look an this text, the plugin’s help or the source code. Perhaps i will develop bas_flyplayer on its own but for the moment the plugin features the approximately the same functions like bas_EMFF. With an exception: It streams videos, not audios :)

Install

  • Download und unzip bas_flvplayer.zip
  • Copy the content of bas_flvplayer.txt
  • Open the admin -> plugins tab.
  • Past the content of bas_flvplayer.txt into the text area
  • Activate the plugin
  • Open the content – > files tab
  • Upload flvplayer.swf
  • If you have a -flv-video, you are ready to stream.

Advanced Install

bas_flvplayer offers the option to run an advanced install located at the extension tab

Just klick to add and the script adds some values for bas_flvplayer intp txp_prefs. These are used as plugin’s default-values.

Screenshot Advanced Prefs You can edit these preferences at admin -> advanced preferences.

This can save some time and tipping, e.g. you want to use different with and height.
Values set in bas_flvplayer-Tag overwrite the saved preferences.

There is also an advanced uninstall script, which removes plugins’s preferences from db. the unistall is also located at the extension tab.
If you want to delete the plugin, make sure, to run the advanced uninstall first or the preferences will stay in db.

Usage

The simplest way is to use bas_flvplayer in combination with txp file system. Upload the player flvplayer.swf and your videos with textpattern and include plugin’s tag into an article, an page or an form:

<bas_flvplayer video='4' />

This tag will play the video with txp file-ID 4. This XHTML is delivered by the plugin:

<object type="application/x-shockwave-flash" data="http://samisdat.dev/file_download/3?file=http://samisdat.dev/file_download/4&autoStart=false" width="320" height="240">
<param name="movie" value="http://samisdat.dev/file_download/3?file=http://samisdat.dev/file_download/4&autoStart=false" />
<param name="wmode" value="transparent" />
</object>

Usage with Custom Fields

Instead of referring to videos by attribute in the tag, you can use a custom-field.

Rename a custom-flied at admin -> advanced preferences into Video.
This custom-field will be use to define the video file, if no video attribute is set in plugins’s tag.

If you use custom-field Video, just include to article or article-form:

<bas_flvplayer />

If a video is refered by the custom-field, this video will be played. If the field is empty, no XHTML will be delivered.

bas_flfplayer-Tag und Attribute

The bas_flvplayer-Tag accepts the following attributes. Default values are marked

player flvplayer

Defines the flashplayer. The attribute can have different values:

  • <txp:bas_flvplayer player='4'/> The file with ID 4 will be used as player. Make sure, the player points to the correct ID.
  • <txp:bas_flvplayer player='flvplayer.swf'/> The file named flvplayer.swf in txp file-system is used as player.
  • <txp:bas_flvplayer player='flash/flvplayer.swf'/> This defines the file flash/emff_inx.swf as player. If the value of player includes a /, bas_flvplayer don’t use the txp file-system.

Note: I included the attribut to this description, but it was included into bas_emff to make it skinable. I don’t know a skin for Flvplayer.
So use player only, if you don’t want to use txp file-system.

video

Use video like player:

  • <txp:bas_flvplayer video='4'/> The file with ID 4 will be played
  • <txp:bas_flvplayer video='a-video'/> The file named a-video will be played
  • <txp:bas_flvplayer video='flash/video.flv'/> Plays flash/video.flv

width 110 & height 34 Ssurprise: width defines the width and height the height Use the height and width of your video, the controllbar will be added.

autostart false

An other “nomen est omen”-attribute.

<txp:bas_flvplayer id='4' autostart='1' />

Playes the video as soon as the player is loaded.

debug false

<txp:bas_emff debug='true' />

In debug-mode some informations are displayed which are hidden in normal-mode.
Perhaps it helps you to find an error.

License

The Flvplayer by Jeroen is licensed under Creative Commons License BY NC SA

Please Note

The Flvplayer and bas_flvplayer are opensource and the are free within there license.

But video-files may be protected by copyright.
Playing videos which you don’t have to right to play is forbidden.

Use Textpattern and bas_flvplayer to create and to present not to steal.

Comments

Sep 24, 06:34 PM

Ragger

Hi Bastian,

Beautiful plugin, thanks for that.
But I can’t get it to work in Opera and yes, I updated the Flash-plugin. Is it working for you? How would that be possible? I hope you have a suggestion.

TIA, greetings, Ragger

Sep 26, 09:35 AM
Ragger

Hey, I already know :)
See the Textpattern-forum.

Bye, Ragger

Write a new comment