diff options
author | James McDonnell <jmcdonnell@blackberry.com> | 2017-03-28 17:23:25 -0400 |
---|---|---|
committer | James McDonnell <jmcdonnell@blackberry.com> | 2017-10-23 14:10:43 +0000 |
commit | 82694e41b1d37e04ecc911f420ad4317220f8180 (patch) | |
tree | 831804b09c5fc36be0e103444c596149771d4a78 /src/imports/multimedia/Video.qml | |
parent | 66c0334a3c4cb8deb63c67aa70da3f4ed94f89a4 (diff) | |
download | qtmultimedia-82694e41b1d37e04ecc911f420ad4317220f8180.tar.gz |
Propagate customAudioRole into the QML classes
Propagate customAudioRole into the Audio, MediaPlayer and Video
classes.
[ChangeLog][Audio/Video/MediaPlayer] Added customAudioRole string
property to enable use of audio roles beyond those available via the
audioRole enum property.
Change-Id: If3c4ec20f014653d31d1fa0d1ad925084f446478
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/imports/multimedia/Video.qml')
-rw-r--r-- | src/imports/multimedia/Video.qml | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/imports/multimedia/Video.qml b/src/imports/multimedia/Video.qml index 66b86c74b..19c437869 100644 --- a/src/imports/multimedia/Video.qml +++ b/src/imports/multimedia/Video.qml @@ -38,7 +38,7 @@ ****************************************************************************/ import QtQuick 2.0 -import QtMultimedia 5.9 +import QtMultimedia 5.11 /*! \qmltype Video @@ -302,13 +302,31 @@ Item { \li MediaPlayer.AccessibilityRole - for accessibility, such as with a screen reader. \li MediaPlayer.SonificationRole - sonification, such as with user interface sounds. \li MediaPlayer.GameRole - game audio. + \li MediaPlayer.CustomRole - The role is specified by customAudioRole. \endlist + customAudioRole is cleared when this property is set to anything other than CustomRole. + \since 5.6 */ property alias audioRole: player.audioRole /*! + \qmlproperty string Video::customAudioRole + + This property holds the role of the audio stream when the backend supports audio roles + unknown to Qt. It can be set to specify the type of audio being played, allowing the + system to make appropriate decisions when it comes to volume, routing or post-processing. + + The audio role must be set before setting the source property. + + audioRole is set to CustomRole when this property is set. + + \since 5.11 + */ + property alias customAudioRole: player.customAudioRole + + /*! \qmlproperty bool Video::seekable This property holds whether the playback position of the video can be |