mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-22 09:15:18 +00:00
VideoPlayer no longer jumps back after resuming
This commit is contained in:
parent
c01fcdcb54
commit
dc395e9b3c
|
@ -56,7 +56,6 @@ SilicaItem {
|
||||||
apiClient: ApiClient
|
apiClient: ApiClient
|
||||||
itemId: playerRoot.itemId
|
itemId: playerRoot.itemId
|
||||||
autoOpen: true
|
autoOpen: true
|
||||||
//autoPlay: true
|
|
||||||
onStreamUrlChanged: {
|
onStreamUrlChanged: {
|
||||||
if (mediaSource.streamUrl != "") {
|
if (mediaSource.streamUrl != "") {
|
||||||
player.source = streamUrl
|
player.source = streamUrl
|
||||||
|
@ -105,13 +104,14 @@ SilicaItem {
|
||||||
|
|
||||||
function stop() {
|
function stop() {
|
||||||
player.stop()
|
player.stop()
|
||||||
//player.source = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
property bool enabled: true
|
||||||
id: playerReadyToSeek
|
id: playerReadyToSeek
|
||||||
target: player
|
target: player
|
||||||
onPlaybackStateChanged: {
|
onPlaybackStateChanged: {
|
||||||
|
if (!enabled) return;
|
||||||
if (startTicks > 0 && player.playbackState == MediaPlayer.PlayingState) {
|
if (startTicks > 0 && player.playbackState == MediaPlayer.PlayingState) {
|
||||||
console.log("Seeking to " + Utils.ticksToMs(startTicks))
|
console.log("Seeking to " + Utils.ticksToMs(startTicks))
|
||||||
player.seek(Utils.ticksToMs(startTicks))
|
player.seek(Utils.ticksToMs(startTicks))
|
||||||
|
|
Loading…
Reference in a new issue