[英]How to play swf file on Google TV device?
I have tried this 我已经试过了
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
String pathFlash = getExternalFilesDir(null).getAbsolutePath() + File.separator + "flash/1.swf";
File file = new File(pathFlash);
intent.setDataAndType(Uri.fromFile(file), "flash/*");
startActivity(intent);
But it crashes the application because android cannot find the proper activity to play a flash file. 但这会导致应用程序崩溃,因为android无法找到播放Flash文件的正确活动。
I there any other way to play flash files on the google tv device? 我还有其他方法可以在Google电视设备上播放Flash文件吗?
You can play flash video in a limited way using Chrome (Flash 10 and lower currently works). 您可以使用Chrome以有限的方式播放Flash视频(目前支持Flash 10及更低版本)。 Try passing the local uri to the flash file to Chrome - it might work - I have not tried it.
尝试将本地uri传递到Flash文件中,然后将其传递给Chrome浏览器-可能可行-我没有尝试过。 You could also try creating a local html file with the flash object embeded into it an load that in Chrome (local flash file reference in the html - pass the uri of the html using an intent)
您也可以尝试创建一个将Flash对象嵌入其中的本地html文件,然后在Chrome中加载(在html中引用本地Flash文件-使用意图传递html的uri)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.