QuickTime

Installation

Follow these steps to install this script on your wiki.

  1. Go to System Settings inside the Control Panel.
  2. Under Extensions, click Add Script.
  3. Enter a descriptive name for the extension
  4. Under Configuration add the following to the Manifest field: http://scripts.mindtouch.com/quicktime.xml
  5. Add extra configuration values as listed below under Configuration (If Configuration is not listed below, ignore this step.)
  6. Click on add script.

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


Overview

Embed videos created with QuickTime Pro. This script requires MindTouch Deki 1.8.3 or later.

Functions:

  1. quicktime

quicktime(movie, poster, width, height, label) : xml

Embed video created with QuickTime Pro.

Parameters:

NameTypeDescription
movieuriUri to QuickTime movie.
posteruriUri to QuickTime poster.
widthnumWidth of QuickTime video.
heightnumHeight of QuikTime video.
labelstr(optional) Label on poster. (default: "Click to Play")


Source Code

<extension>
	<title>Apple QuickTime Extension</title>
  <label>QuickTime</label>
  <uri.help>http://wiki.developer.mindtouch.com/MindTouch_Deki/Extensions/QuickTime</uri.help>
  <description>Embed videos created with QuickTime Pro.</description>
	
	<function>
		<name>quicktime</name>
    <description>Embed video created with QuickTime Pro.</description>
		<param name="movie" type="uri">Uri to QuickTime movie.</param>
		<param name="poster" type="uri">Uri to QuickTime poster.</param>
		<param name="width" type="num">Width of QuickTime video.</param>
		<param name="height" type="num">Height of QuikTime video.</param>
		<param name="label" type="str" optional="true">Label on poster. (default: "Click to Play")</param>
		<return>
			<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
				<head>
					<script src="http://www.apple.com/library/quicktime/scripts/ac_quicktime.js" language="JavaScript" type="text/javascript"></script>
					<script src="http://www.apple.com/library/quicktime/scripts/qtp_library.js" language="JavaScript" type="text/javascript"></script>
					<link href="http://www.apple.com/library/quicktime/stylesheets/qtp_library.css" rel="StyleSheet" type="text/css" />
				</head>
				<body>
					<script type="text/javascript">
						QT_WritePoster_XHTML(
							<eval:js>args.label ?? 'Click to Play'</eval:js>, 
							<eval:js>args.poster</eval:js>,
							<eval:js>args.movie</eval:js>,
							<eval:js>string.cast(args.width)</eval:js>, 
							<eval:js>string.cast(args.height)</eval:js>, 
							'',
							'controller', 'true',
							'autoplay', 'true',
							'bgcolor', 'black',
							'scale', 'aspect');
					</script>
					<noscript>
						<object eval:width="args.width" eval:height="args.height" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
							<param name="src" eval:value="args.poster" />
							<param name="href" eval:value="args.movie" />
							<param name="target" value="myself" />
							<param name="controller" value="false" />
							<param name="autoplay" value="false" />
							<param name="scale" value="aspect" />
							<embed eval:width="args.width" eval:height="args.height" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
								eval:src="args.poster"
								eval:href="args.movie"
								target="myself"
								controller="false"
								autoplay="false"
								scale="aspect">
							</embed>
						</object>
					</noscript>
				</body>
			</html>
		</return>
	</function>
</extension>

Tag page
You must login to post a comment.
Powered by MindTouch Deki v.8.08.2