FlowPlayer

Installation

Follow these steps to install this script on your wiki.

  1. Go to Service managmenent inside the Control Panel.
  2. Under Add Service, click Local and select type Extension.
  3. Enter a descriptive name and the SID: sid://mindtouch.com/2007/12/dekiscript
  4. Add "manifest" to the config section with value set to http://scripts.mindtouch.com/flowplayer.xml
  5. Add extra configuration values as listed below under Configuration (If Configuration is not listed below, ignore this step.)
  6. Click on add service.

Related Links: DekiScript service, Extension Overview, DekiScript Overview, Extension Demos.


Overview

This extension allows to view FLV media in your wiki. This script requires MindTouch Deki 1.8.3 or later.

Functions:

  1. flowplayer

flowplayer(source, width, height, start, skin) : 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")


Source Code

<extension>
	<title>MindTouch FlowPlayer Extension</title>
	<label>FlowPlayer</label>
	<copyright>Copyright (c) 2008 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>
		<return>
			<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
				<head><script type="text/javascript" src="http://scripts.mindtouch.com/res/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/FlowPlayerClassic.swf'</eval:if>
									<eval:elseif test="string.compare(args.skin, 'light', true) == 0">'http://scripts.mindtouch.com/res/FlowPlayerLight.swf'</eval:elseif>
									<eval:elseif test="string.compare(args.skin, 'dark', true) == 0">'http://scripts.mindtouch.com/res/FlowPlayerDark.swf'</eval:elseif>
									<eval:else>'http://scripts.mindtouch.com/res/FlowPlayerClassic.swf'</eval:else>
								</eval:if>
								<eval:else>'http://scripts.mindtouch.com/res/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" />,
									autoPlay: <eval:js value="args.start ?? false" />
								}
							}
						);
					</script>
				</tail>
			</html>
		</return>
	</function>
</extension>

Tag page

Files 1

FileSizeDateAttached by 
 test.flv
No description
358.78 kB22:09, 26 Jun 2008coreygActions
Viewing 4 of 4 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
Viewing 4 of 4 comments: view all
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC1