an7_moviaian7 » code » txp John Einselen, 28.05.07 (updated 10.04.11)
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.
<txp:an7_mov dir="2007/06/" mov="2007preview.mov" width="480" height="270" />
– the media directory where QT files reside
– name and extension of the file to embed
– width of the file
– height of the file (the QT controller height is automatically added if you set it to display)
– unnecessary by Apple’s own admission, but included all the same
– starts playing immediately or not, true / false
– saves the media on the users computer to make page reloads faster, true / false
– show the QT controller, true / false
– prevent movies from being saved, true / false
– look the movie, true / false / palindrome (loop back and forth)
– display the QT logo (only shows while the media initially loads), true / false
– default volume level, value 0 to 100
– class for the DIV wrapper
<txp:an7_movbox dir="2007/06/" mov="2007preview.mov" width="480" height="270" />
Please note: mediaboxAdvanced does not natively support .mov files due to the problems in performing reliable browser checks. Because of this, the QT object may continue playing in some browsers, even after the overlay is closed.
<txp:an7_video dir="2007/06/" flv="2007preview.flv" width="480" height="270" />
<txp:an7_videobox dir="2007/06/" flv="2007preview.flv" width="640" height="360" />
this plugin is currently in beta
1 (version 0.4.4)
Required scripts for an7_mov and an7_video –
SWFobject (for flash content) (less than 8kb)
JW FLV player
Required scripts for an7_movbox and an7_videobox –
Mediabox or mediaboxAdvanced (and associated support files)
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.
<script src="/css/mediabox.js" rel="stylesheet" type="text/css"></script>
— fixed support for mp4, mpg, swf, and more
— fixed IE inline flash support
— fixed erroneous lowercasing of names
— updated for MediaboxAdvanced 0.9.0
— added option for lightbox code, use an7_movbox with any lightbox style script
— fixed integration with Mediabox 0.6.7
— added flash video and Mediabox support, still beta
— public beta release
help and support
For questions and support, please visit the an7_mov post in the Textpattern Forums.
The tutorials from thresholdstate.com tutorials were helpful as always, as was php.net and the apple.com developers documents.
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.
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.