我试图制作一个视频播放应用程序,这是我到目前为止得到的代码:
import QtQuick 2.0
import QtMultimedia 5.0
import Ubuntu.Components 1.1
import QtQuick.Dialogs 1.0
Video {
FileDialog {
id: fileDialog
title: "Please choose a file(.mp4)"
Component.onCompleted: visible = true
}
id: video
width : units.gu(120)
height : units.gu(90)
source : fileDialog.fileUrl
MouseArea {
Text
{
text : "click to play,space for stop,left and right to seek position in video"
}
anchors.fill: parent
onClicked: {
video.play()
}
}
focus: true
Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
Keys.onLeftPressed: video.seek(video.position - 5000)
Keys.onRightPressed: video.seek(video.position + 5000)
}这些代码在我的IDE上运行得非常好,但是当我在我的Ubuntu15.04上安装它时,在我的笔记本电脑上安装了统一8,应用程序就崩溃了。我猜想QtQuick.Dialogs 1.0可能不是平台的一部分?那么我如何将它打包到.click?Or中呢?是否有一个替代方案是平台的一部分?
发布于 2015-08-28 16:24:20
事实是,API不提供对此的支持。因为API实现了沙箱,所以内容集线器。我的申请将不得不走入沙箱。
https://askubuntu.com/questions/581393
复制相似问题