FMX.MediaPlayerHD Sample

From RAD Studio Code Examples
Jump to: navigation, search

This sample illustrates how to load and play a media file, using FireMonkey.

Location

You can find the MediaPlayerHD sample project at:

Description

This application uses TMediaPlayer, TMediaPlayerControl, and TTimer in order to implement the HD media player.

How to Use the Sample

Load the wanted media file using the load button from the upper-left corner of the form. The file will start playing immediately. If the loaded file is a video file, the image is displayed on the center of the form.

  1. Navigate to one of the locations given above and open:
    • Delphi: MediaPlayerHD.dproj.
    • C++: CppMediaPlayerHD.cbproj.
  2. Press F9 or choose Run > Run.

Classes

MediaPlayerForm.pas represents the main window unit of the sample. It contains the TForm240 class, that defines the main form and contains:

Implementation

The sample:

  • Loads the media file, displays information about the loaded file in the upper-right corner, and enables the controls to manipulate the loaded file (pause, forward/rewind, volume, visibility).
  • Implements the actions to be attached to each control that allows to manipulate the loaded file.

Uses

See Also