2
* The Shadowbox QuickTime player class.
4
* This file is part of Shadowbox.
6
* Shadowbox is an online media viewer application that supports all of the
7
* web's most popular media publishing formats. Shadowbox is written entirely
8
* in JavaScript and CSS and is highly customizable. Using Shadowbox, website
9
* authors can showcase a wide assortment of media in all major browsers without
10
* navigating users away from the linking page.
12
* Shadowbox is released under version 3.0 of the Creative Commons Attribution-
13
* Noncommercial-Share Alike license. This means that it is absolutely free
14
* for personal, noncommercial use provided that you 1) make attribution to the
15
* author and 2) release any derivative work under the same or a similar
18
* If you wish to use Shadowbox for commercial purposes, licensing information
19
* can be found at http://mjijackson.com/shadowbox/.
21
* @author Michael J. I. Jackson <mjijackson@gmail.com>
22
* @copyright 2007-2008 Michael J. I. Jackson
23
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
24
* @version SVN: $Id: shadowbox-qt.js 104 2008-06-28 20:09:34Z mjijackson $
32
var C = SB.getClient();
35
* Constructor. This class is used to display QuickTime movies.
37
* @param {String} id The id to use for this content
38
* @param {Object} obj The content object
41
Shadowbox.qt = function(id, obj){
45
// height defaults to 300 pixels
46
this.height = this.obj.height ? parseInt(this.obj.height, 10) : 300;
47
if(SB.getOptions().showMovieControls == true){
48
this.height += 16; // height of QuickTime controller
51
// width defaults to 300 pixels
52
this.width = this.obj.width ? parseInt(this.obj.width, 10) : 300;
55
Shadowbox.qt.prototype = {
58
* Returns an object containing the markup for this content, suitable
59
* to pass to Shadowbox.lib.createHTML().
61
* @param {Object} dims The current Shadowbox dimensions
62
* @return {Object} The markup for this content item
65
markup: function(dims){
66
var options = SB.getOptions();
67
var autoplay = String(options.autoplayMovies);
68
var controls = String(options.showMovieControls);
74
height: this.height, // height includes controller
77
{ tag: 'param', name: 'src', value: this.obj.content },
78
{ tag: 'param', name: 'scale', value: 'aspect' },
79
{ tag: 'param', name: 'controller', value: controls },
80
{ tag: 'param', name: 'autoplay', value: autoplay }
85
markup.classid = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B';
86
markup.codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';
88
markup.type = 'video/quicktime';
89
markup.data = this.obj.content;
96
* Removes this movie from the document.
103
document[this.id].Stop(); // stop QT video stream
105
var el = SL.get(this.id);
107
//el.innerHTML = ''; // stop QT audio stream for movies that have not yet loaded