Tag: Width Color Presence Action Note pre NES license RET
Once you're done. PPAPI plug-in development, actual use may have the following requirements:
- Dynamically creating PPAPI Plugins
- Remove Ppapi Plugin
- Changing the size of the PPAPI plug-in
The implementation is very easy, from JS directly to the DOM (BOM) can be. The following is a demo sample HTML file:
<! DOCTYPE html>
The above HTML shows several common operations for creating, deleting, and resizing.
It is important to note that when you delete a Ppapi plug-in, you call the Diddestroy method to Ppp_instance, and you need to remove the plugin instance from the C++/C code here and release the corresponding resource. For example, the graphics 2D. Image data, and so on. Diddestroy call, after a while. Assume that no other plug-in instance exists. It will then call Ppp_shutdownmodule. Assuming there is, it will not.
The logic, can participate in understanding PPAPI design .
When you set the width and Height properties of the Embed element, the Ppapi plugin is in. The Ppp_instance Didchangeview method is called, and you need to create the relevant resources again, based on the new dimensions.
That's it.
Other reference articles are described in my column: "CEF and Ppapi development ".
Dynamic creation, alteration, and deletion of Ppapi plugins