VCL.VideoPlayer Sample
Contents
This sample shows the use of the thumb buttons in the Windows task bar to play or pause a video in a Delphi/C++ application.
Location
You can find the VideoPlayer sample project at:
- Start | Programs | Embarcadero RAD Studio Athens | Samples and then navigate to either:
- Object Pascal\VCL\Taskbar\VideoPlayer
- CPP\VCL\Taskbar\VideoPlayer
- Subversion Repository:
- You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
Description
The application creates a main form that has the functionality to open a video. Use the TMediaPlayer controls or the TThumbBarButton in the Windows task bar to play or pause the video.
How to Use the Sample
- Navigate to Start | Programs | Embarcadero RAD Studio Athens | Samples and open:
- Delphi: VideoPlayer.dproj
- C++: CPPVideoPlayer.cbproj
- Press F9 or choose Run > Run.
Files
This project has one source file (Unit3 for Delphi and Unit4 for C++), which contains the class for the main form.
Classes
- TForm3, the form class, implements the main visual component of the application. It contains a TMediaPlayer component and a TTaskbar component to reproduce videos.
Implementation
- The main form contains a TMediaPlayer component to reproduce a video and a TTaskbar component to control it.
- The TTaskbar component has two TThumbBarButton, and you can click on them to play and pause the video.
- The TActionList component defines the actions for the TThumbBarButton.
Uses
- Vcl.Taskbar.TTaskbar
- Vcl.Taskbar.TThumbBarButton
- Vcl.Taskbar.TTaskbar.TaskBarButtons
- Vcl.MPlayer.TMediaPlayer