video - Qt QML Mediaplayer Source Address for root file system -
i try play video using qml mediaplayer. qt version 5.3.1 , code use is:
mediaplayer { id: mediaplayer source: ./video.mp4 loops: mediaplayer.infinite onerror: { console.debug("mediaplayer video error\n"); console.debug(errorstring); } onplaying: { console.debug("mediplayer plays, hasvideo: ", hasvideo, "\n"); console.debug("videoplayer source address: ", source, "\n"); } }
i want play video located under directory same qt app. when playback starts get:
mediplayer plays, hasvideo: false videoplayer source address: qrc:///video.mp4
i have tried give source path this:
source: qt.resolvedurl("./video.mp4")
but result doesn't change.
if try play video qrc giving source url as:
source: "qrc:///video.mp4"
it logs:
mediplayer plays, hasvideo: false videoplayer source address: qrc:///video.mp4
but video doesn't playback. how can manage make mediaplayer's "hasvideo: true" play it?
Comments
Post a Comment