不用WebView能不能在Android下播放flv流视频,太慢了?我的意思是直接从url播放.flv视频。有什么想法吗?VideoView现在可以使用.flv链接。
发布于 2012-05-20 00:57:16
我使用下面的代码让它正常工作。您可以从您的设备本地播放它,也可以从在线播放它。您必须在影片中拖动FLV组件的一个实例,然后将其从舞台上删除并保留在库中。
var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = "content/video/BeauIntro.flv"; // CHANGE THIS TO YOUR FLV
myVideo.autoPlay = true;
// I am choosing to load the flv into an empty movie but you don't have to.
var my_mc:MovieClip = new MovieClip();
addChild(my_mc);
/// These are important because it can mess up position with out it.
myVideo.align = StageAlign.TOP_LEFT;
myVideo.scaleMode = VideoScaleMode.EXACT_FIT;
// Setting the video to the screen size of device
myVideo.width = stage.stageWidth;
myVideo.height = stage.stageHeight;
// Adding my FLV into my empty movie.
my_mc.addChild(myVideo);
//Setting the empty Movie Clip for the video to the screen size of device
my_mc.width = stage.stageHeight;
my_mc.height = stage.stageHeight;
/// This will run when the video stops
myVideo.addEventListener(fl.video.VideoEvent.COMPLETE, VideoStopped);
function VideoStopped(e:Event):void
{
myVideo.stop();
myVideo.visible = false; /// I wanted it to not be seen after playing.
trace("stopped");
myVideo.removeEventListener(fl.video.VideoEvent.COMPLETE, VideoStopped);
}发布于 2013-08-24 00:03:44
试试这个: String在这里;url=your =新的意图();
intent.setAction(Intent.ACTION\_VIEW); intent.setDataAndType(Uri.parse(url), "flv-application/octet-stream"); startActivity(intent);https://stackoverflow.com/questions/10417143
复制相似问题