Zoom Player plug-in

Questions and comments specific to a particular plugin should go here.
igvk
Experienced User
Posts: 60
Joined: Wed Jan 09, 2013 7:22 pm

Re: Zoom Player plug-in

Post by igvk » Tue Jul 11, 2017 9:33 pm

topix wrote:I'm not the author but i made the changes regarding socket. Please try the attached version.
Sorry, I made a small error. In fact, you should change function to "StreamSelectNav", the opposite of what I wrote.
You have a misspell there in the source ("ionNav").

igvk
Experienced User
Posts: 60
Joined: Wed Jan 09, 2013 7:22 pm

Re: Zoom Player plug-in

Post by igvk » Tue Jul 11, 2017 9:40 pm

topix wrote:can you show me your code changes and how you generate the volume event?

I will include the new version in the next release.
Here's what I changed (a little hacky):

Code: Select all

        self.PlayState = -1
        self.PlayVolume = 0
in class ZoomPlayer.__init__()

Code: Select all

        elif header == "2300":
            state = int(state)
            self.PlayVolume = state
            self.TriggerEvent("Volume", state)
in ValueUpdate()

This way, PlayVolume has the value of the last requested volume.
Probably, it would be better to also update it when it's modified via plugin.

It would actually be much better to define new function AdjustVolume that would take volume delta (positive or negative).

User avatar
topix
Experienced User
Posts: 381
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Zoom Player plug-in

Post by topix » Tue Jul 11, 2017 10:03 pm

Why store the Volume inside the plugin when it's not used? Any reason for this? I personally wouldn't store the volume because there can be chance that the value will be outdated. Instead always query the actual value.

I would skip this, because as you said the value has also to be changed on setting the volume what makes the changes to the plugin bigger.
If you wanna do it, i'll appreciate it.

igvk
Experienced User
Posts: 60
Joined: Wed Jan 09, 2013 7:22 pm

Re: Zoom Player plug-in

Post by igvk » Tue Jul 11, 2017 10:16 pm

topix wrote:hmm, i'm blind. I can't find "StreamSelectNav" nor "StreamSelectionNav" :shock:
You made a typo, search for "ionNav" in your modified code.
Why store the Volume inside the plugin when it's not used? Any reason for this?
I would skip this, because as you said the value has also to be changed on setting the volume what makes the changes to the plugin bigger.
If you wanna do it, i'll appreciate it.
Volume is stored to use it in EG actions.
Example:

Code: Select all

eg.plugins.ZoomPlayer.plugin.DoCommand("2300"); vol = eg.plugins.ZoomPlayer.plugin.PlayVolume; eg.plugins.ZoomPlayer.exSetVolume(str(vol+int(eg.event.payload)))
Yes, it would be better to implement all this in the plugin itself.
But it's a little less trivial for me, because I don't usually use Python.

Post Reply