Multimedia - CD control

 

Declaration

<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="text" ACTION="text (options)" TRACK="number" WAIT="YES/NO" />

Related Topics   

Description

Controls the CD drive on the computer.

Practical Usage

Commonly used to simulate an alarm clock, server audio notification tool, radio music broadcast system or any other application that requires audio to be played. This activity supports audio cd operations only.

Parameters

General

Property

Type

Required

Default

Markup

Description

CD-ROM drive to use

Text

Yes

(Empty)

  1. DRIVELETTER="default"

  2. DRIVELETTER="f:"

The drive letter of the CD-ROM that the command should be directed to. If set to "default" the default CD-ROM drive is used.

Action

Options

Yes

(None)

  1. ACTION="play"

  2. ACTION="pause"

  3. ACTION="resume"

  4. ACTION="stop"

  5. ACTION="previous"

  6. ACTION="next"

  7. ACTION="open"

  8. ACTION="close"

The action that should be performed on the CD-ROM drive. If unsure, hover the mouse over each button to determine its action. The available options are:

  • Play - Causes the CD-ROM to begin playing the audio CD from the first to the last track

  • Pause - Causes the CD-ROM to pause playback of the audio CD

  • Resume - Causes the CD-ROM to resume playing the audio CD from the current track.

  • Stop - Causes the CD-ROM to stop playing the audio CD.

  • Previous - Causes the CD-ROM to go back one track on the currently playing audio CD

  • Next - Causes the CD-ROM to skip to the next track on the currently playing the audio CD

  • Open - Causes the CD-ROM to eject or open the drive door.

  • Close - Causes the CD-ROM to close the tray or drive door.

  • Play Track - Causes the CD-ROM to begin playing the tracks specified in the Track parameter.

  • Test -Tests functionality of CD-ROM drive.

Track

Number

Yes

(Empty)

  1. TRACKS="4"

  2. TRACKS="2,5,9"

  3. TRACKS="1-3"

The tracks that should be played. To specify multiple tracks, separate them with a dash (i.e. 2-5 will play tracks 2 through 5) or a comma (i.e. 1,5 will play tracks 1 and 5). Valid only when the Action parameter is set to Play,Resume or Play Track.   

Wait for tracks to finish before continuing task

Yes/No

No

No

WAIT="YES"

If selected, causes the task to stop at the current step and not continue until the entire CD or the specified tracks have finished playing. When disabled, the CD Player will return and allow the task to continue immediately while the CD is playing.

Description

Error Causes

On Error

Examples

NOTE:
  • The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
  • Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.

Example 1  

This sample task goes to the previous track on the default CD drive and then waits until the track is finished playing before continuing.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" WAIT="YES" />

Example 2

This sample task plays the CD in the CD player labeled as the "F" drive.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="F" />

Example 3

This sample task plays tracks 1 to 5 on the CD located in the default drive and then waits until the tracks are finished playing before continuing.

Copy
<AMMULTIMEDIA ACTIVITY="cd_player" DRIVELETTER="F" WAIT="YES" />