![](/img/trans.png)
[英]How To Use Flash SWF File As a Skin For My Custom HTML5 Video Player
[英]how to play swf file in standalone adobe flash player in html5
我必须在Web浏览器中而不是在单独的Adobe Flash Player中播放Shockwave文件,并且该Shockwave文件中也包含xml文件作为内容。 欢迎所有建议
Google刚刚启动了一个名为“ Swiffy”的新Google Labs项目。 它将Flash SWF文件转换为HTML5。
它使您可以在没有Flash Player的设备(例如iPhone和iPad)上重用Flash内容。
来源: http : //www.webpronews.com/convert-swf-files-to-html5-with-swiffy-2011-06
import java.io.File;
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
public class ReadHtml implements Runnable {
private static String flashFileName = "";
private static String flashXmlName = "";
private static String flashString = "";
private static String flashPlayer = "flashplayer_11_sa";
private static String htmlFilePath = "";
public final static void main(String[] args) throws Exception {
File file = new File("D:/.../index.html");
Document doc = null;
Element link = null;
if (file.exists()) {
htmlFilePath = file.getParent();
doc = Jsoup.parse(file, "UTF-8", "");
link = doc.select("embed").first();
}
flashXmlName = link.attr("flashvars");
flashFileName = link.attr("src");
flashString = flashFileName + "?" + flashXmlName;
flashString = htmlFilePath + File.separator + flashString;
Thread CmdThread = new Thread(new ReadHtml());
CmdThread.start();
}
@Override
public void run() {
try {
final String[] cmdArray = { flashPlayer, flashString };
final Process process = Runtime.getRuntime().exec(cmdArray);
process.waitFor();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.