使用 cefsharp 或 Geckofx 播放 Flash 视频

Playing Flash video using cefsharp or Geckofx

我正在组装一个简单的 winforms 应用程序,用于为我的孩子播放来自网络的视频。到目前为止,我已经探索了两种选择,但我都遇到了问题:

cefsharp:播放视频不是问题,但它不会保留 cookie(即使设置了 CachePath),所以我必须每次都登录网站时间。这不会很 user-friendly.

GeckoFX:无论我去哪个网站(例如youtube),flash 视频都无法播放。我在视频所在的页面上有一个银行部分。基于其他问题,我尝试添加行 "Gecko.GeckoPreferences.Default["extensions.blocklist.enabled"] = false;"就在初始化语句之后,但这没有用。我是 运行 xulrunner-33.0.2 和 GeckoFx-Windows-33.0-0.2.

任何有关如何使任一解决方案正常工作的想法都将不胜感激。

更新: 我找到了这个网站 https://bitbucket.org/geckofx/geckofx-29.0/issue/14/plugin-flash-not-working-since-xulrunner which stated to turn off the "Visual Studio hosting process" for the project and now YouTube video play with GeckoFX, but no videos play off xfinitytv's site (http://xfinitytv.comcast.net/watch-live-tv/).

最近修复了 CefSharp 中的一个错误,使之成为可能。看到这个问题:https://github.com/cefsharp/CefSharp/issues/843

应该起作用的是:

  • 设置CachePath
  • 设置persist_session_cookies命令行参数
  • OnContextInitialized 之后,调用 Cef.SetCookiePath

您需要使用最新版本 39.0.1 才能访问 OnContextInitialized 委托。