mediaName

Type: String

Availability: Read or write at any time

The mediaName property contains the name of the medium currently installed in the MultiMedia class. The medium name can be the name of a data file or the name of a device, as shown in the code fragments in the following examples.

mm.mediaName := "c:\media\avi\intro.avi";
mm.mediaName := "cdaudio";

The default value is null (""). See also the openDialog method.

The device types that can be accessed are listed in the following table.

Device Type Description
animation Animation device
cdaudio Audio CD player
dat Digital audio tape player
digitalvideo Digital video in a window
overlay Overlay device (analog video in a window)
scanner Image scanner
sequencer MIDI sequencer
vcr Videotape recorder or player
videodisc Videodisc player
waveaudio Audio device that plays digitized waveform files

The file types that can be handled depend on the software that is installed on the workstation, including the types listed in the following table.

File Type Description
wav Sound files
mid MIDI sequence
avi Video with or without sound
mp3 MPEG-1 Audio Layer-3
mp4 MPEG Layer-4 Audio
mpg MPEG video or audio

If the useDotNetVersion property is set to true, the value of the mediaName property can be a URL; for example, http://hostName/images/introduction.mp4. For details about using the MP4 version of a control, see the useDotNetVersion property.

For some types, specific software (device drivers) is required.

Setting the mediaName property causes the current medium that is being played in the control to be discarded. The appropriate device driver is selected, and the medium is readied for playing. If the mediaName property was set at development time and represents a file, the contents of the file are copied to the mediaData property, and the mediaName property is no longer relevant.

If the mediaName property is set at run time and represents a file, the file is accessed directly by the device driver. The mediaData property is not set to the contents of that file unless it is accessed by logic. You should therefore avoid accessing the mediaData property unless it is necessary, particularly for large files.

JADE handles only binary data that has a length less than the maximum database cache size, so an attempt to store large files in the database may fail. To cover situations where the data is copied by logic, ensure that only files of a size less than half the cache size are stored.