mixer / interactive-unity-plugin

Unity Plugin for Mixer Interactivity
MIT License
59 stars 23 forks source link

any ETA on custom controls support ? #109

Closed rasterknight closed 6 years ago

rasterknight commented 6 years ago

I want to have controls on top of video (overlay) and looks like I cannot do this with non-custom controls ?

So I tried using HTML custom ones, works fine, except I dont receive callbacks like: MixerInteractive.GetButton("BUTTON_ID").

So is there an ETA for this feature ?

Thanks. Nicolas

payzer commented 6 years ago

Yea if you want to go on video (and it's not just mouse input), then you need to use custom controls.

Actually, if you want the MixerInteractive.GetButton("BUTTON_ID") API to work with a custom control, it's possible. You just need to make sure your giveInput() call on the JavaScript side matches the format of a button event. There's an example of the button message in this section of the protocol doc: https://dev.mixer.com/guides/mixplay/protocol/specification#input

rasterknight commented 6 years ago

Cool thanks for the lead, I had hard time finding this info as this is my first try at custom controls. Will dig into this. Thanks.

payzer commented 6 years ago

No worries! We're always glad to help and it's always good to know which parts of our documentation could be more discoverable :) Thank you for posting the issue!

rasterknight commented 6 years ago

Hi, Here is a recap of what I found hard to understand and stuff that can "fail" silently and have dev guessing .. at least me ;-)

In CDK/HTML Mode: by default the controls in the Schema have the property disabled: false: I had to change to true to have them work.

In CDK/HTML Mode: by default in the JS file which get DOM buttons events to resend them to MixerInteractive, the DOM events used are .onclick, and logically then creates a mixer.socket.call with event:'click', but from what I understood later, click is not used internaly in MixerInteractice, and in fact in Mixer for Unity the code handles mainly: mousedown, mouseup. Once I changed the event type to mousedown events worked with MixerInteractive.GetButton("...") in Unity/C#.

Last small detail: In the roadmap file Custom Controls is market as planned but not done, so It can be though that it is normal that it does not work. but now as I got at least the events working I'm confused, what Custom Controls support means ? https://github.com/mixer/interactive-unity-plugin/blob/master/roadmap.md

Hope it helps. and thanks for the support. Nicolas

payzer commented 6 years ago

Thank you for the feedback. I will share it with the team.

I'll also update the roadmap right now. Custom controls are supported.