-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
percent-pos property is 'null' before quitting #66
Comments
The question is how would the fix look like? Output 100.0 or always save the previous value when the value is null? I'm not 100% sure if that wouldn't eventually cause some error at a different place and doesn't quite seem like an elegant fix. |
Currently, I save the last percent-pos elsewhere and update it if it's non-null only, so after exiting I have the last known percent-pos transmitted by mpv: vankasteelj/frak@39e1e8b It's inelegant, but it works so far. |
I don't know if mpv introduced a new state to avoid that "null" percent-pos in their latest updates, if they decided to void that value, or what. The thing is, I don't know where that "null" comes from, if it's from mpv or your code. |
I believe it has to do with how events are handled since MPV 0.31, that states in the release notes something like "deprecate timed events", because as of >0.30 atm pause/resume events are fired twice. |
Interessting. I will have to read into that. It's always a pain to deal with different MPV versions, because you never know which one people have installed. If you use the Verison from Ubuntu or Debian Distributions it's ancient... |
Has this issue ever occured again? Just asking to see if it's worth investing time in. |
Still using the workaround, so I'm guessing yeah, nothing changed on my side. But I havent tested without the workaround |
I used the following code to reproduce the issue (slightly adapted to the breaking changes I made with version 2)
It does output |
Bug Description
When listening to 'statuschange' event and adding a 'percent-pos' property to observe, when quitting MPV, the percent-pos is set to 'null' on MPV > 0.29
How To Reproduce
Software Versions
Additional context
Might not be a node-mpv issue but a MPV issue? Trying to update from 0.29 has caused that problem mainly, afaik.
The text was updated successfully, but these errors were encountered: