Predefined ActiveX element
The component can be used in a visualization by using an ActiveX visualization element.
To do this, the component name NativeControls.Mediaplayer must be referenced in an ActiveX element. Then the media player will be available embedded in a visualization.
Functionality
Method | Data type of the return value | ||
|---|---|---|---|
1 |
|
| Relative path or stream, such as When using Qt5, a custom GStreamer pipeline is possible. This can be used for cameras with Video4Linux which are directly connected. |
2 |
|
| Sets the volume |
3 |
|
| Sets repeat |
4 |
|
| Sets the playback speed |
5 |
|
| Sets the playback position Jumps to the position Position (in milliseconds) |
6 |
|
| Parameter Activates the mirroring on the y-axis |
7 |
| Starts the playback | |
8 |
| Pauses the playback | |
9 |
| Stops the playback | |
10 |
|
| Returns the playback position |
11 |
|
| Returns the duration of the medium (in milliseconds) |
12 |
|
| Returns the status of the media player. |
Statuses of the media player
Statuses of the NativeControls.Mediaplayer.getMediaStatus method
Value ( |
|
|---|---|
1 | There is currently no media file available. The player is in |
2 | The current media file is being loaded. The player can be in any state. |
3 | The current media file has been loaded. The player is in |
4 | Playback of the current media has been paused due to insufficient buffering or another temporary interruption. The player is in |
5 | The player is buffering data, but has buffered enough data to continue playback for now. The player is in |
6 | The playback has reached the limits of the current medium. The player is in |
7 | The current media file cannot be played. The player is in |
State of the media player using the NativeControls.Mediaplayer.getState method
Value ( |
|
|---|---|
1 | The media player is currently not playing any content. Playback begins at the start of the current track. |
2 | The media player is currently playing content. This corresponds to the "playing" property. |
3 | The media player has paused playback. Playback of the current track will resume from where the player was paused. |
Dependencies in Linux SL runtime systems
libqt6multimedia6
libqt6multimediaquick6
libqt6multimediawidgets6
qml6-module-qtmultimedia
gstreamer-1.0-qt6
Additionally, you can install the RTSP plug-in.
Dependencies in Windows
Note
Possible only when the overlay function is enabled.
For more information, see the following: Settings
Important
Qt Media Backend interface
In some cases, the Qt Media Backend is not automatically detected by the platforms. In that case, it must be manually configured via the environment variable QT_MEDIA_BACKEND.
Hardware platform
A multicore CPU and hardware acceleration is recommended for efficient video decoding.
CODESYS Remote TargetVisu
Note the following if you intend to use the media player with files. The remote target visualization is not intended for the automatic upload of video files. If necessary, these must therefore be stored manually set to the CODESYS Remote TargetVisu.
CODESYS Control Win SL
Note that all videos should be played from files with a relative path. For the process to run smoothly, it is essential that the files are available before the application is started.