FlowPlayer Extension
Vendor
MindTouch
Type Script
Categories Media
Requires MindTouch Deki 1.8.3 or later
Status Stable
License Free/Open Source
Manifest http://scripts.mindtouch.com/flowplayer.xml

 

Table of Contents

Description

This extension allows to view FLV media in your wiki.

See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.


Functions

flowplayer(source, width, height, start, skin, splash, loop) : xml

Embed FLV Player.

Parameters:

NameTypeDescription
sourceuriMedia uri.
widthnum(optional) Player width. (default: 425)
heightnum(optional) Player height. (default: 350)
startbool(optional) Auto-start player. (default: false)
skinstr(optional) Player skin. (one of "classic", "light", or "dark"; default: "classic")
splashuri(optional) URI of Splash image
loopstr(optional) Loop the Video (Default:False)


Script Source

<extension>
	<title>FlowPlayer Extension</title>
	<label>FlowPlayer</label>
	<copyright>Copyright (c) 2006-2009 MindTouch, Inc.</copyright>
	<description>This extension allows to view FLV media in your wiki.</description>
	<uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/FlowPlayer</uri.help>
  <uri.logo>http://scripts.mindtouch.com/logos/flowplayer-logo.png</uri.logo>

  <function>
		<name>flowplayer</name>
		<description>Embed FLV Player.</description>
		<param name="source" type="uri">Media uri.</param>
		<param name="width" type="num" optional="true">Player width. (default: 425)</param>
		<param name="height" type="num" optional="true">Player height. (default: 350)</param>
		<param name="start" type="bool" optional="true">Auto-start player. (default: false)</param>
		<param name="skin" type="str" optional="true">Player skin. (one of "classic", "light", or "dark"; default: "classic")</param>
		<param name="splash" type="uri" optional="true">URI of Splash image</param>
        <param name="loop" type="str" optional="true">Loop the Video (Default:False) </param> 
		
		<return>
			<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
				<head><script type="text/javascript" src="http://scripts.mindtouch.com/res/flowplayer/flashembed.min.js" /></head>
				<body><div eval:id="@id" /></body>
				<tail>
					<script>
						flashembed(
							<eval:js value="@id" />, {
								src: <eval:if test="args.skin">
									<eval:if test="string.compare(args.skin, 'classic', true) == 0">'http://scripts.mindtouch.com/res/flowplayer/FlowPlayerClassic.swf'</eval:if>
									<eval:elseif test="string.compare(args.skin, 'light', true) == 0">'http://scripts.mindtouch.com/res/flowplayer/FlowPlayerLight.swf'</eval:elseif>
									<eval:elseif test="string.compare(args.skin, 'dark', true) == 0">'http://scripts.mindtouch.com/res/flowplayer/FlowPlayerDark.swf'</eval:elseif>
									<eval:else>'http://scripts.mindtouch.com/res/flowplayer/FlowPlayerClassic.swf'</eval:else>
								</eval:if>
						
								<eval:else>'http://scripts.mindtouch.com/res/flowplayer/FlowPlayerClassic.swf'</eval:else>,
								width: <eval:js value="web.size(args.width ?? 425)" />,
								height: <eval:js value="web.size(args.height ?? 350)" />
							}, {
								config: {
									videoFile: <eval:js value="args.source" />,
									loop: <eval:js value="args.loop ?? false" />,
									autoPlay: <eval:js value="args.start ?? false" />,
									splashImageFile: <eval:js value="args.splash" />
								}
							}
						);
					</script>
				</tail>
			</html>
		</return>
	</function>
</extension>

 

Tag page

Files 1

FileSizeDateAttached by 
 test.flv
No description
358.78 kB22:09, 26 Jun 2008coreygActions
Viewing 6 of 6 comments: view all
In Start parameter default value is false not true, if you want the file does not start you gotta write false. xml stated as follows:
{config: {videoFile:
<eval:js value="source"/>
,autoPlay:
<eval:js value="start"/>
Posted 09:55, 27 Jun 2008
I don't understand. Does something need to be fixed or not?
Posted 14:41, 27 Jun 2008
Default value in start parameter is true. When leaving it in blank the player auto-starts. I have also pointed this out in the blog entry. At least it was 12 hours ago.
Have a nice weekend. edited 21:27, 27 Jun 2008
Posted 21:26, 27 Jun 2008
This should be fixed now.
Posted 22:03, 27 Jun 2008
thanks to coreyg for updating the xml to include "splashImageFile" as a param! Now you can add a splash image to your movie. (Hint: If you want a "play" button include it in the splash image .jpg)
Posted 16:14, 30 Sep 2008
does this extension add a play pause function to the movie? Can you point me to a site where i can see a demo of this extension?
Posted 12:10, 17 Feb 2009
Viewing 6 of 6 comments: view all
You must login to post a comment.