Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved Video plays a portion repeatedly when I implement in qml in android

    Mobile and Embedded
    1
    1
    475
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Abin last edited by

      I have a video player make in qml. Slider value is binded to Mediaplayer's position as I need to show slider moving along with the video.

      Also I need to move the video position to the slider position if slider is moved manually.

      I wrote the below code, but i get warning and video is playing each small portion repeatedly when slide bar is moved.

      warning is: qt-reserved-files/qml/QtQuick/Controls/Slider.qml:199:5: QML RangeModel: Binding loop detected for property ""

      MediaPlayer {
          id: idVideo
      }
      
      Slider {
          id: idSlider
          anchors.bottom: idrow.top
          anchors.right: parent.right
          anchors.rightMargin: 85
          width: 400
          value: idVideo.position // for slider to move along with movie
          minimumValue: 0
          maximumValue: idVideo.duration
      
          // for movie to move as slider is moved to manually.
          onValueChanged: { 
              idVideo.seek(idSlider.value)
          }
      }
      

      This issue is not found in windows. If I do not set onValueChanged movie will not seek as slider bar is moved. Is there a solution to this?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post