an7_mov 28.05.07, John Einselen

With yet another IE browser version, things have gotten complicated when trying to use Quicktime media on a website. The latest specifications require the use of JS and inline code to embed a QT file (more can be found on the Apple website).

There are two options: either write a separate JS file for every QT media element you’ll use on your site, or use a master JS file and send the parameters via an inline script. Using the later method, the an7_mov plugin allows Textpattern to easily interface with the new requirements. Most of the settings (autoplay, loop, controller, etc.) can be setup in the plugin code as defaults, making repeated use of the tag as simple as possible.

an7_mov example

<txp:an7_mov dir="2007/06/" mov="2007preview.mov" width="480" height="270" />



tag options

dir="media"
– the media directory where QT files reside

mov=""
– name and extension of the file to embed

width=""
– width of the file

height=""
– height of the file (the QT controller height is automatically added if you set it to display)

activex=""
– unnecessary by Apple’s own admission, but included all the same

autoplay="false"
– starts playing immediately or not, true / false

bgcolor="black"
– background colour (only shows while the media initially loads), in javascript or #hex format

cache="true"
– saves the media on the users computer to make page reloads faster, true / false

controller="true"
– show the QT controller, true / false

kiosk="false"
– prevent movies from being saved, true / false

loop="false"
– look the movie, true / false / palindrome (loop back and forth)

showlogo="true"
– display the QT logo (only shows while the media initially loads), true / false

volume="80"
– default volume level, value 0 to 100

class="an7_mov"
– class for the DIV wrapper

an7_movbox example

play


an7_video example

DUE TO DEBILITATING ERRORS IN INTERNET EXPLORER, THIS PREVIEW HAS BEEN REMOVED TILL FURTHER NOTICE

<txp:an7_video dir="2007/06/" flv="2007preview.flv" width="480" height="270" />

an7_videobox example

play


download

this plugin is currently in beta,
use at your own risk

an7_mov (version 0.2.0)

Required support files for an7_mov and an7_video –

AC_Quicktime
SWFobject (for flash content) (less than 8kb)
JW Mediaplayer or JW FLVplayer

Required for an7_movbox and an7_videobox –

Mootools javascript library, mediabox requires the Base, Class, Native, Element, Window, and Effects modules (in total, less than 30kb).
Mediabox (about 12kb)

installation

Open the textpattern plugin file and copy / paste the text into your Textpattern “install plugin” field (Admin > Plugins). Finish the installation procedure and enable the plugin.

Download the required javascripts and insert the appropriate code in your page header. Please refer to each scripts page for more details and setup options.

<script src="/css/mediabox.js" rel="stylesheet" type="text/css"></script>
...
<script src="js/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>
<script src="/js/swfobject.js" type="text/javascript"></script>
<script src="/js/mootools.v1.11.js" type="text/javascript"></script>
<script src="/js/mediabox.js" type="text/javascript"></script>
...

version history

v0.3.0
— fixed integration with Mediabox 0.6.7
v0.2.0
— added flash video and Mediabox support, still beta
v0.1.0
— public beta release

help and support

For questions and support, please visit the an7_mov post in the Textpattern Forums.

credits

The tutorials from thresholdstate.com tutorials were helpful as always, as was php.net and the apple.com developers documents.

« comment
bookmark

Hi

Thanks for a great plugin. I have it working nicely with the exception of one small thing. I run the movies over a cross-fading slideshow, and during the transitions, video flickers and displays poorly. This is to be expected because of z-indicies.

So…

Is there any way you could provide a means of calling an external function (say, slideshow pause) when mediabox is invoked and another (say, slideshow play) when the user closes the mediabox window?

I assume this would not be too difficult, but I’d love to get your help, or point me to the right places in your script.

Thanks
-Dale

posted 1.10.07, by Dale Chapman