haecker-felix / Gradio

GNU General Public License v3.0
326 stars 51 forks source link

Fix MPRIS raise callback not working #324

Closed germanfr closed 6 years ago

germanfr commented 6 years ago

Fixes #322

haecker-felix commented 6 years ago

Huh? That is the fix for the issue? Well, i'll belive you ;)

germanfr commented 6 years ago

Yes, because if you pass the function as is, it's called against the first callback argument. That means that "this" is set to another thing that is not a window. You need to call it from the window object or bind it. It's like in JavaScript.