How to play Video in Ubuntu using QML
-
wrote on 14 Apr 2017, 04:54 last edited by
Hi Everyone ,
Can anyone help to play video using QML in ubuntu
-
wrote on 14 Apr 2017, 06:54 last edited by
Hi @Sushma_MP
Following piece of code should help you to play video if your Ubuntu machine is setup with GStreamer.
import QtMultimedia 5.0
Window {
title: qsTr("Hello World")
width: 640
height: 480
visible: true
Video
{
id: video
anchors.fill: parent
source: "file:///home/manu/Desktop/Projects/song.mp4"MouseArea { anchors.fill: parent onClicked: { video.play() } } }
}
1/2