Working with Digital Media in PDF Documents
Media Players: Control, Settings, Renditions, and Events
8
T
ABLE
8.2
MediaSettings Object Properties
Property
Description
The number of times the playback repeats
Indicates whether the media player controls will be
visible
Defines the starting time or frame for playback
Indicates whether the media player will be visible
The playback volume
An enumeration obtained from
App.media.WindowType
indicating whether the
media player window will be docked or floating
repeat
showUI
startAt
visible
volume
windowType
The example below illustrates how to customize the number of repetitions for playback:
// obtain the MediaSettings object, and store its repeat value
var nRepeat = event.action.rendition.getPlaySettings().repeat;
if (nRepeat == 1)
nRepeat = 2;
else
nRepeat = 1;
// set the new repeat value when opening the media player
var args = { settings: {repeat: nRepeat} };
app.media.openPlayer(args);
The example below illustrates how to play a docked media clip in a Screen annotation:
app.media.openPlayer({
rendition: this.media.getRendition("myClip"),
annot: this.media.getAnnot({
nPage: 0,
cAnnotTitle: "myScreen"
}),
settings: {
windowType: app.media.WindowType.docked
}
});
Acrobat JavaScript Scripting Guide
147