Problems with the source of Video Output /Video/Media Player in QML
-
Does the source have to be an absolute path?
main.qml and myVideo.mp4 are in the same folder, and I have also added the video manually in the qrc file in QtCreator.
I tried relative path, but it doesnt work (error 2: failed to load media):
@
MediaPlayer {
id: mediaplayer
source: "myVideo.mp4"
autoPlay: true
}@It only works with absolute path.
@ MediaPlayer {
id: mediaplayer
source: "file:///Users/mshefiti/Developer/Qt/QtWorkspace/Workflow_Sensitive_UI/myVideo.mp4"
autoPlay: true
}@Also, how can I stream a video from the internet (lets say youtube)? I tried to put the youtube link, but it also doesnt work:
@
MediaPlayer {
id: mediaplayer
source: "https://www.youtube.com/watch?v=m2qJMbzwA3w"
autoPlay: true
}@Any suggestions anyone? Thanks
-
I already saw other open topics with the same problem, and no one has an answer yet.
So, it seems a bug. Please, report to the https://bugreports.qt-project.org