Hi,
I'm using Firebreath environment to develop a NPAPI plugin abstracting the media player engine of ours to create a web based player.
I'm stuck with the following problem. I've following files,
MyPlugin.cpp
MyPluginAPI.cpp
Player.cpp
MyPluginAPI.cpp/MyPluginAPI.h contains the methods and events I register for the Javascript. But I've another class defined in Player.cpp which actually talks with the underlying MediaPlayer engine to achieve the playback. Playback is working fine. It's like this JS Layer has a Play button, upon button click I call the Play function defined in MyPluginAPI.cpp which in turn calls Play function in Player.cpp to achieve the playback.
Now I'm trying to implement a playback slider bar (progress bar) for which I'll get the value from Player.cpp talking to the MediaPlayer engine. Now I want to send this slider position event up to the JS layer.
If my Player.cpp implementation was in MyPluginAPI.cpp, then I'd have easily got access to the slider position event I've defined and called appropriate method in MyPluginAPI.cpp to percolate the event to JS layer.
Now my problem is, how do I do it from Player.cpp?? Should I inherit the Player class from FB::JSAPIAuto??