Original CEF3 2623.1397 open Ppapi Flash Plugin

Source: Internet
Author: User

Recently found Wke play flash or game there will be a lot of bugs, such as video does not play or stage3d can not be used and so on.

After the study should be a lite version, so decided to try to use CEF3 port Soui, but the demo version is a bit old, so want to upgrade.

found that the 23XX version began to be unable to directly use the NPAPI Flash plugin, the default is closed

Here is an example of the CEF demo program Cefclient:

There are 2 ways to start the Flash plugin, but I do not recommend the NPAPI way, in fact very bad, is said to be inefficient and unstable.

So here is the default Ppapi way.

The first thing to do:

Create a new directory under the Cefclient directory Pepperflash drop the downloaded Pepflashplayer.dll plugin into the directory.

Then follow the methods below.

Method 1:

Create a shortcut shortcut directly to the compiled cefclient and add the parameter--register-pepper-plugins= "pepperflash/pepflashplayer.dll;application/ X-shockwave-flash "then start with a shortcut to discover that Flash is playing normally.

If you want to turn on Npapi mode, then add the parameter--enable-npapi.

Method 2:

Unlike the above method, you need shortcuts and so on, you can start without parameters.

Open source Cefclient, and open the file client_app_browser.cc file to find the function onbeforecommandlineprocessing.

1 voidclientappbrowser::onbeforecommandlineprocessing (2     Constcefstring&Process_type,3Cefrefptr<cefcommandline>command_line) {4   //Pass Additional command-line flags to the browser process.5   if(Process_type.empty ()) {6     //Pass Additional command-line flags when off-screen rendering is enabled.7     if(command_line->Hasswitch (switches::koffscreenrenderingenabled)) {8       //If The PDF extension is enabled and then cc surfaces must are disabled for9       //PDFs to render correctly.Ten       // Seehttps://bitbucket.org/chromiumembedded/cef/issues/1689For details. One       if(!command_line->hasswitch ("disable-extensions") && A!command_line->hasswitch ("disable-pdf-extension")) { -Command_line->appendswitch ("disable-surfaces"); -       } the  -       //Use software rendering and compositing (disable GPU) for increased FPS -       //and decreased CPU usage. This would also disable WebGL so remove these -       //switches If you need that capability. +       // Seehttps://bitbucket.org/chromiumembedded/cef/issues/1257For details. -       if(!command_line->Hasswitch (SWITCHES::KENABLEGPU)) { +Command_line->appendswitch ("Disable-gpu"); ACommand_line->appendswitch ("disable-gpu-compositing"); at       } -  -       //Synchronize The frame rate between all processes. This results in -       //decreased CPU usage by avoiding the generation of extra frames that -       //would otherwise be discarded. The frame rate can is set at browser -       //creation time via cefbrowsersettings.windowless_frame_rate or changed in       //dynamically using Cefbrowserhost::setwindowlessframerate. In Cefclient -       //it can be set via the command-line using '--off-screen-frame-rate=xx '. to       // Seehttps://bitbucket.org/chromiumembedded/cef/issues/1368For details. +Command_line->appendswitch ("enable-begin-frame-scheduling"); -     } the  *     //This parameter resolves a multi-window problem $Command_line->appendswitch ("Process-per-site");Panax NotoginsengCommand_line->appendswitch ("Enable-npapi"); -Command_line->appendswitchwithvalue ("Register-pepper-plugins","Pepperflash/pepflashplayer.dll;application/x-shockwave-flash"); the  +Delegateset::iterator it =Delegates_.begin (); A      for(; it! = Delegates_.end (); + +it) the(*it)->onbeforecommandlineprocessing ( This, command_line); +   } -}

Modify the code as above and recompile.

Open the Youku again to see, is not OK.

Also found that the right-click menu is in English, here you can set the parameter locale for ZH-CN in Settings.

Original CEF3 2623.1397 open Ppapi Flash Plugin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.