Audio filename, caption and seeking

- display caption independent of filename (consistancy to File)
- fix audio seeking not working
- change two comments and a variable name
This commit is contained in:
Andreas Gattringer
2024-07-15 17:24:48 +02:00
parent d574a97a35
commit cb4c6cb677
4 changed files with 7 additions and 15 deletions

View File

@@ -28,11 +28,6 @@ ColumnLayout {
*/
required property string eventId
/**
* @brief The display text of the message.
*/
required property string display
/**
* @brief The media info for the event.
*
@@ -44,6 +39,7 @@ ColumnLayout {
* - width - The width in pixels of the audio media.
* - height - The height in pixels of the audio media.
* - tempInfo - mediaInfo (with the same properties as this except no tempInfo) for a temporary image while the file downloads.
* - filename - original filename of the media
*/
required property var mediaInfo
@@ -138,7 +134,7 @@ ColumnLayout {
id: playButton
}
QQC2.Label {
text: root.display
text: root.mediaInfo.filename
wrapMode: Text.Wrap
Layout.fillWidth: true
}
@@ -159,7 +155,7 @@ ColumnLayout {
from: 0
to: audio.duration
value: audio.position
onMoved: audio.seek(value)
onMoved: audio.setPosition(value)
}
QQC2.Label {

View File

@@ -29,11 +29,6 @@ ColumnLayout {
*/
required property string eventId
/**
* @brief The display text of the message.
*/
required property string display
/**
* @brief The media info for the event.
*
@@ -45,7 +40,7 @@ ColumnLayout {
* - width - The width in pixels of the audio media.
* - height - The height in pixels of the audio media.
* - tempInfo - mediaInfo (with the same properties as this except no tempInfo) for a temporary image while the file downloads.
* - filename
* - filename - original filename of the media
*/
required property var mediaInfo