FMX.Media.TMediaPlayer
Delphi
TMediaPlayer = class(TFmxObject)
C++
class PASCALIMPLEMENTATION TMediaPlayer : public Fmx::Types::TFmxObject
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.Media.pas FMX.Media.hpp |
FMX.Media | FMX.Media |
Description
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
- FMX.Media.TMedia
- FMX.Media.TMediaPlayerControl
- FMX.Media.TMediaCodecManager
- Audio-Video in FireMonkey
Samples
- MediaPlayerHD sample
- MediaPlayer sample
- PlayAudioFile sample
- VideoPlayback sample