Reputation: 271
Im trying to create a simple radio app on Ubuntu Touch using the development tool "clickable" yet I cant seem to wrap my head around how to install required QML components.
MediaPlayer {
id: player
source: "https://<some url>.mp3"
onStatusChanged: {
if (status == MediaPlayer.EndOfMedia) {
button.pressed = false
button.text = i18n.tr("Play")
}
}
}
Button {
anchors.centerIn: parent
id: button
text: i18n.tr("Play")
pressed: false
onClicked: {
if (player.playbackState == 1){
player.stop()
pressed = false
text = i18n.tr("Play")
}
else{
pressed = true
text = i18n.tr("Stop")
player.play()
}
}
}
}
The above code results in the following error
..../Main.qml:39 MediaPlayer is not a type
I've tried installing QTmultimedia using apt-get, with no result. How am I suppose to locally add this component to the project? The project seems to have is own version of QML locally
Upvotes: 0
Views: 120