Warning, /maui/arca/src/controls/previewer/AudioPreview.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.9 0002 import QtQuick.Controls 2.2 0003 import QtQuick.Layouts 1.3 0004 0005 import QtMultimedia 5.8 0006 0007 import org.mauikit.controls 1.3 as Maui 0008 0009 Item 0010 { 0011 id: control 0012 0013 property alias player: player 0014 0015 MediaPlayer 0016 { 0017 id: player 0018 source: currentUrl 0019 autoLoad: true 0020 autoPlay: true 0021 property string title : player.metaData.title 0022 0023 onTitleChanged: 0024 { 0025 infoModel.append({key:"Title", value: player.metaData.title}) 0026 infoModel.append({key:"Artist", value: player.metaData.albumArtist}) 0027 infoModel.append({key:"Album", value: player.metaData.albumTitle}) 0028 infoModel.append({key:"Author", value: player.metaData.author}) 0029 infoModel.append({key:"Codec", value: player.metaData.audioCodec}) 0030 infoModel.append({key:"Copyright", value: player.metaData.copyright}) 0031 infoModel.append({key:"Duration", value: player.metaData.duration}) 0032 infoModel.append({key:"Track", value: player.metaData.trackNumber}) 0033 infoModel.append({key:"Year", value: player.metaData.year}) 0034 infoModel.append({key:"Rating", value: player.metaData.userRating}) 0035 infoModel.append({key:"Lyrics", value: player.metaData.lyrics}) 0036 infoModel.append({key:"Genre", value: player.metaData.genre}) 0037 infoModel.append({key:"Artwork", value: player.metaData.coverArtUrlLarge}) 0038 } 0039 } 0040 0041 0042 ColumnLayout 0043 { 0044 anchors.centerIn: parent 0045 width: Math.min(parent.width, 200) 0046 height: Math.min(400, parent.height) 0047 spacing: Maui.Style.space.big 0048 0049 Item 0050 { 0051 Layout.fillWidth: true 0052 Layout.fillHeight: true 0053 0054 Maui.IconItem 0055 { 0056 height: parent.height 0057 width: parent.width 0058 iconSizeHint: height 0059 iconSource: iteminfo.icon 0060 imageSource: iteminfo.thumbnail 0061 } 0062 } 0063 0064 Maui.ListItemTemplate 0065 { 0066 Layout.fillWidth: true 0067 label1.text: player.metaData.title 0068 label1.font.pointSize: Maui.Style.fontSizes.huge 0069 label2.font.pointSize: Maui.Style.fontSizes.big 0070 label1.horizontalAlignment:Qt.AlignHCenter 0071 label2.horizontalAlignment:Qt.AlignHCenter 0072 0073 label2.text: player.metaData.albumArtist || player.metaData.albumTitle 0074 } 0075 0076 Slider 0077 { 0078 id: _slider 0079 Layout.fillWidth: true 0080 orientation: Qt.Horizontal 0081 from: 0 0082 to: 1000 0083 value: (1000 * player.position) / player.duration 0084 onMoved: player.seek((_slider.value / 1000) * player.duration) 0085 } 0086 } 0087 0088 } 0089 0090