Kodi Community Forum
Weird Slider behaviour - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Weird Slider behaviour (/showthread.php?tid=141189)



Weird Slider behaviour - bossanova808 - 2012-09-24


So I am trying to do a track seeking slider for an external audio player (for touch users)

I have a slider in WindowXML and I am using onClick() to detect events, and getPercent to get the position (and I have a gui update loop doing setpercent).

So - it starts off ok - I get a bunch of onClick events as the slider is dragged. For each of these events I do a seek and that seems to work with the external player.

I then release the slider bar....and then the weirdness........I then get a bunch more onClick events, going back 1 by 1 in terms of percent to roughly where I started....and the slider drags itself back (and ultimately goes haywire, I guess because of a 0 event)

Any ideas on why that might be happeningHuh

(testing with Frodo nightlies)





RE: Weird Slider behaviour - jmarshall - 2012-09-29

Is anything setting the progress bar to anything? i.e. you don't have an <info> tag in there anywhere or anything?


RE: Weird Slider behaviour - bossanova808 - 2012-09-30

Well basically I use a thread lock to seek the external player to a particular time in seconds, then that finishes (and reports back it has seeked) and then the general GUI update thread queries the player as to where it's currently at and updates the progress bar.

I can't see why that would step backwards in 1 second increments...just seems weird.

No, there's no info tag:

Code:
<!-- TRACK PROGRESS BAR -->
      <control type="slider" id="998">
        <description>Track Playing Progress</description>
        <posx>60</posx>
        <posy>350</posy>
        <width>560</width>
        <height>16</height>
              <texturesliderbar>seekslider2.png</texturesliderbar>
              <textureslidernib>osd_slider_nibNF.png</textureslidernib>
              <textureslidernibfocus>osd_slider_nib.png</textureslidernibfocus>
        <visible>SubString(Window.Property(XSQUEEZE_PLAYING_RADIO),false)</visible>
      </control>

It's a weird one - the general API for seeking with this (squeezebox cli) is pretty heavily used/tested so seems pretty unlikely it's not seeking, but I guess I will have to test that more...