8
Working with Digital Media in PDF Documents
Media Players: Control, Settings, Renditions, and Events
Specifying Playback Settings
You can use Acrobat JavaScript to obtain and adjust the media settings offered by a player.
To do this, invoke the
Rendition
object’s
getPlaySettings
method, which returns a
MediaSettings
object, as shown in the code below:
var settings = myRendition.getPlaySettings();
In additon to the
App.media
properties and methods, a
MediaSettings
object, which
is used to create a
MediaPlayer
object, contains many properties related to the
functional capabilities of players. These are described below in
Table 8.2:
T
ABLE
8.2
MediaSettings Object Properties
Property
Description
Determines whether to play media clip automatically
when the player is opened
Used to resolve any relative URLs used in the media clip
Specifies the background color for the media player
window
Specifies the background opacity for the media player
window
Defines the ending time or frame for playback
The contents of the media clip (
MediaData
object)
The number of seconds required for playback
An object containing the location and size properties of a
floating window used for playback
A value indicating whether and how the content should
be resized to fit the window
Defines the rectangle containing the display monitor
used for playback
The category of display monitor used for playback (such
as primary, secondary, best color depth, etc)
The document page number used in case a docked
media player is used
Indicates that the media can play from beginning to end,
and then in reverse from the end to the beginning
The list of available players for this rendition
The playback speed
autoPlay
baseURL
bgColor
bgOpacity
endAt
data
duration
floating
layout
monitor
monitorType
page
palindrome
players
rate
146
Acrobat JavaScript Scripting Guide