~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to lib/shadowbox-2.0/src/player/README

  • Committer: Keith Hughitt
  • Date: 2010-02-17 22:00:59 UTC
  • mfrom: (402.1.68 hv)
  • Revision ID: keith.hughitt@nasa.gov-20100217220059-wmdq7kgokj4seryx
Merged with Keith's branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
A Shadowbox "player" is a class that is used specifically for displaying a
2
 
particular medium. For example, an image player is included for displaying
3
 
images, a Flash video player is included for playing FLV files, etc.
4
 
 
5
 
All players should implement the same interface. This makes it easy for the
6
 
Shadowbox script to know what methods to call and properties to check on player
7
 
objects.
8
 
 
9
 
The interface is described here, with some simple explanations of how each
10
 
method and/or property is to be used.
11
 
 
12
 
METHOD/PROPERTY     DESCRIPTION
13
 
 
14
 
markup()            Produces the HTML markup for the object.
15
 
 
16
 
onLoad()            (optional) Called after the content is loaded and the
17
 
                    loading layer is hidden.
18
 
 
19
 
remove()            Removes this object from the DOM.
20
 
 
21
 
height              (number) The height of the object (in pixels).
22
 
 
23
 
width               (number) The width of the object (in pixels).
24
 
 
25
 
ready               (optional, boolean) True if the content is ready to be
26
 
                    loaded, false otherwise. Useful when the script should wait
27
 
                    until the content loads before proceeding (see below).
28
 
 
29
 
resizable           (optional, boolean) True if the content can be dynamically
30
 
                    resized by the script (e.g. images, but not most movie
31
 
                    formats).
32
 
 
33
 
If the ready property is set to false, the script will wait until it is no
34
 
set to true. This should be set in some callback function within the player
35
 
class itself. In this case, the object's height and width do not need to be made
36
 
available immediately (because they may not initially be known). However, in the
37
 
same callback, the height and width should be set. See the Shadowbox.img class
38
 
for an example of this behavior.