如何使用PhantomJS进行闪存?

Jul*_*ien 12 flash phantomjs

我正在使用PhantomJS 1.4.1(支持Flash中的插件,如1.5中删除)--qt-4.8.

我无法在PhantomJS中启用Flash.我用的是--load-plugins=yes选项.我设置了QTWEBKIT_PLUGIN_PATH包含libflashplayer.so的所有路径:

QTWEBKIT_PLUGIN_PATH=/usr/lib/browser-plugins:/usr/lib/flash-plugin:/usr/lib/mozilla/plugin:/usr/lib64/flash-plugin:/usr/lib64/mozilla/plugins:/usr/lib64/opera/plugins
Run Code Online (Sandbox Code Playgroud)

我可以看到stracePhantomJS确实发现libflashplayer.so:

stat("/usr/lib64/opera/plugins/libflashplayer.so", {st_mode=S_IFREG|0755, st_size=18782520, ...}) = 0
lstat("/usr/lib64/flash-plugin/libflashplayer.so", {st_mode=S_IFREG|0755, st_size=18782520, ...}) = 0
stat("/usr/lib64/flash-plugin/libflashplayer.so", {st_mode=S_IFREG|0755, st_size=18782520, ...}) = 0
stat("/usr/lib64/flash-plugin/libflashplayer.so", {st_mode=S_IFREG|0755, st_size=18782520, ...}) = 0
stat("/usr/lib/flash-plugin/libflashplayer.so", {st_mode=S_IFREG|0755, st_size=17047372, ...}) = 0
[..]
Run Code Online (Sandbox Code Playgroud)

在同一台服务器上,Flash可以在Firefox 10.0中正常运行

不知道幻影为何不被PhantomJS使用?

Ark*_*ady 2

本文档可能会有所帮助:http://developer.qt.nokia.com/doc/qt-4.8/qtwebkit.html#netscape-plugin-support

在所有情况下,请在 wiki 页面和/或邮件列表中搜索 PhantomJS 在 Flash(和其他插件)上的位置。简而言之:如果有效,请使用它,否则不支持。

来源