Hi I have a plugin.dll which contains this all npp functions I have embeded it in my chrome plugin successfully but I dont know how to call this NPP_StreamAsFile function from my javascript. I dont have any idea. There are so many parameters to pass which I dont have any idea about . please help me. Thanx in advance.
You don't call NPP_StreamAsFile()
yourself, the browser does. There are three types of functions for the NPAPI:
NP_
- the plugin module entry functions etc.NPN_
- the browser interface, the plugin calls themNPP_
- the plugins interface, the browser calls themYou also can't just access NPP
functions directly from scripts, you'd have to provide a scriptable interface for your plugin.
From the plugin side, the process looks like following:
NPN_NewStream()
or NPN_GetURL()
to create a streamNPP_NewStream()
, you have to set *stype
to NP_ASFILE
or NP_ASFILEONLY
NP_ASFILE
and the file is not local, stream data is progressively delivered via NPP_Write()
/NPP_WriteReady()
NPP_StreamAsFile()
.