Show: Delphi C++
Display Preferences


From RAD Studio API Documentation
Jump to: navigation, search



TMediaPlayer = class(TFmxObject)


class PASCALIMPLEMENTATION TMediaPlayer : public Fmx::Types::TFmxObject


Type Visibility Source Unit Parent
class public
FMX.Media FMX.Media


Nonvisual component for media file playback.

Use a TMediaPlayer component for easy access to media files.

The currently accessed media file is specified through the Media property. To specify the media file to be played by the current TMediaPlayer, set the FileName property. The file name must include the path of the file, so it can be localized on the memory, and the extension. Call the Play and Stop methods to start playing a media file, or to stop or pause a running media file. The current position is specified through the CurrentTime property. TMediaPlayer also exposes media file properties such as Duration, VideoSize, Volume or State.

TMediaPlayer can play back audio files and the audio component of a video file. To display a video file, use a TMediaPlayerControl component. For more information, see Audio-Video in FireMonkey.

Note: In order to play an audio file using TMediaPlayer, use the appropriate format:
  • .wav on Windows
  • .caf on iOS and OS X
  • .3GP on Android

See Also


Personal tools
In Other Languages
Previous Versions