In my opinion,vlc firefox plugin is the bridge between browser and the system,javascript can receive the remote control signal and show some message through the vlc plugin embedded in the firefox browser.
Vlc webplugin APIs was realized in vlc/project/mozilla/control/npolibvlc.cpp,you can modify some APIs.Trace the source code,you will find libvlc APIs(or some functions realized in vlc/project/mozilla/vlcplugin.cpp) were used in fact.So,add a method of exist object that is not offered by now,and look at Reference 2 for details.
Example
Now we will add a method of audio object that can be used directly in javascript like vlc.audio.volumeUp.
vlc/project/mozilla/control/npolibvlc.cpp
const NPUTF8 * const LibvlcAudioNPObject::methodNames[] = |
add a case statement to function
RuntimeNPObject::InvokeResult
LibvlcAudioNPObject::invoke(int index, const NPVariant *args,
uint32_t argCount, NPVariant &result)
case ID_audio_volumeup: |
Realize volume_up_32() function in file project/mozilla/vlcplugin.cpp
int VlcPlugin::volume_up_32() |
All's done,make and write a javascript to test it.
Have a try
djstava
References:
1、VLC Javascript API
2、Libvlc API