sumanthegde / ytparts

Play one or more intervals (ranges) of a YouTube video on a loop.
1 stars 1 forks source link

Allow the use of sub-second times for segments #2

Open LevonJohnson opened 2 weeks ago

LevonJohnson commented 2 weeks ago

Presently, any sub-second time input will round down to the nearest second (for example, setting a loop from 0:22.25-0:55.96 would loop between 0:22-0:55, with no consideration of the sub-second interval defined).

Given the length of a second is quite long (in particular, when looping music, e.g. for practising a certain segment), this can often lead to small but unwanted/unnecessary parts of a video being looped.

Ideally, being able to define to at least two decimal places should allow for sufficient granularity.

sumanthegde commented 2 weeks ago

To detect the end of an interval, we rely on the 'timeupdate' event. When the system load is high, this event is said to be fired with gap as high as 250 milliseconds.

In view of this, any granularity under 0.25 second seems to be difficult to guarantee (particularly at the end of intervals).

sumanthegde commented 5 days ago

With the caveat of slight imprecision as mentioned in the above comment, we can accept the inputs with decimal places. Starting from the latest version (1.0.8.1), this can be enabled by going to the extension options page and enabling the respective settings.