0

我正在尝试开发一个 Android 应用程序,它只显示嵌入的视频流,如下所示:

<html>
<embed width="650" height="377 "flashvars="backcolor=111111&amp;frontcolor=CCCCCC&amp;lightcolor=66CC00&amp;autostart=true&amp;skin=http://manage.streamcyclone.com/skins/snel.zip&amp;streamer=rtmp://sc-lb1.streamcyclone.com/janakles_live&amp;file=janakles&amp;plugins=http://manage.streamcyclone.com/plugins/qualitymonitor,gapro-1&amp;abouttext=StreamCyclone Player&amp;aboutlink=http://www.streamcyclone.com/&amp;gapro.accountid=UA-679067-4&amp;gapro.trackpercentage=true&amp;gapro.tracktime=true" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" quality="high" name="mpl" id="mpl" style="undefined" src="http://manage.streamcyclone.com/player/player.swf" type="application/x-shockwave-flash"></embed>
</html>

我已将此 html 文件作为“broad.html”放在资产文件夹中,这是我的代码:

public class BroadcastingActivity extends Activity {
WebView engine;
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    engine = (WebView) findViewById(R.id.web_engine);
    engine.getSettings().setJavaScriptEnabled(true);
    engine.getSettings().setAllowFileAccess(true); 
    engine.getSettings().setPluginsEnabled(true); 
    engine.getSettings().setSupportZoom(false); 
    engine.getSettings().setAppCacheEnabled(false); 
    engine.getSettings().setCacheMode(engine.getSettings().LOAD_NO_CACHE);
    engine.loadUrl("file:///android_asset/broad.html");
}
}

我还在清单文件中设置了 Internet 的权限。但是跑步的时候。没有任何作用!请问有什么帮助吗?

4

1 回答 1

0

您需要 Flash 才能播放此视频,有关更多解决方案,您可以在此处阅读:使用 Flash 和 android webview

于 2013-04-15T23:23:47.653 回答