MediaPlayer QML Type
Provides an interface to control a media player. More...
Import Statement: | import QtInterfaceFramework.Media 1.0 |
In C++: | QIfMediaPlayer |
Inherits: |
Properties
- backendUpdatesEnabled : bool
- configurationId : string
- currentTrack : object
- discoveryMode : enumeration
- discoveryResult : enumeration
- duration : int
- isInitialized : bool
- isValid : bool
- muted : bool
- playMode : enumeration
- playQueue : PlayQueue
- playState : enumeration
- position : int
- preferredBackends : list<string>
- serviceObject : ServiceObject
- volume : int
Methods
Detailed Description
The MediaPlayer provides methods to control a media player. This media player can be local or even a remote device you are connected to e.g. over bluetooth.
By default the autoDiscovery is turned to Automatic for this feature and most likely will connect to a local media player instance.
Uses qtifmedia
as configurationId for InterfaceFrameworkConfiguration based settings.
Property Documentation
backendUpdatesEnabled : bool |
configurationId : string |
currentTrack : object |
Holds the current track represented as QVariant.
Note: This will be replaced by soon.
discoveryMode : enumeration |
discoveryResult : enumeration |
duration : int |
Holds the total duration of the current song in seconds.
isInitialized : bool |
isValid : bool |
playMode : enumeration |
Holds the current playback mode of the media player. Available values are:
Constant | Description |
---|---|
Normal | Each item in the queue is played in sequential order. Usually the playback stops when the end of the queue is reached. |
RepeatTrack | Always repeat the current item. It should still be possible to change the current item using next() and previous(), but this depends on the implementation of the backend. |
RepeatAll | When the end of the queue is reached, the first item starts to play. |
Shuffle | The item in the queue are played in an random order. |
playState : enumeration |
Holds the current playback state of the media player. Available values are:
Constant | Description |
---|---|
Playing | The media player is currently playing an item. |
Paused | The playback is paused and can be continued at the same position. |
Stopped | The playback hasn't been started yet. Starting it, will always start from the beginning. |
position : int |
Holds the position of the current song of the media player in seconds.
serviceObject : ServiceObject |
Method Documentation
play() |
seek(offset) |
Seeks into the current track using offset.
The offset can be positive or negative to either seek forward or backward. A successful seek will result in a change of the position property.
enumeration startAutoDiscovery() |
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.