How to play a video on repeat in QML without lag ?



  • Hello , i am trying to play a video repeatedly but the issue is when my video is getting over and is starting again , there is a lag of a sec and which is clearly visible
    My code is pasted below:
    Video {
    id: video
    width: 1280
    height:620

            autoPlay: true
            autoLoad: true
            source: "/vid/resource_washer(1).ogv"
            signal endOfMedia()
            fillMode: VideoOutput.Stretch
            onStopped: {
                 video.play();
    
            }
    

    Can anyone help ?



  • @vishu_fcb
    Try video.seek(0) instead of video.play() in the onStopped signal. Works for me very well.

    Video {
      id: video
      width: 1280
      height:620
    
      source: "/vid/resource_washer(1).ogv"
      signal endOfMedia()
      fillMode: VideoOutput.Stretch
      onStopped: {
           video.seek(0);
          //  video.play();
      }
    }
    
    


  • @Curtwagner1984 Thanks a lot . I ll give it a shot


Log in to reply