安卓:打从URL FLV视频流 [英] Android: play flv video stream from url
问题描述
目前,我有一个应用程序,记录的视频和上传到我的服务器。上传视频后,应用程序获取持有URL到FLV流文件的响应。
I currently have an app that records a video and uploads it to my server. after uploading the video, the app gets a response that holds a URL to the flv stream to the file.
当我尝试打开在Android默认的视频播放器(影片)没有任何反应流,但是当我用不同的应用程序(BSPlayer),它完美播放的视频。但是,有没有办法强迫从 Intent.ACTION_VIEW
打开一个应用程序。这里是code代表功能,它接收来自服务器的响应:
when I try to open the stream in the android default video player (Videos) nothing happens, but when I used a different app (BSPlayer), it played the video perfectly. however, there is no way to force opening one app from Intent.ACTION_VIEW
. here is the code for the function that receives the response from the server:
@Override
protected void onResponseReceived(int requestType, int status, Object resp) {
switch (requestType) {
case CLIP_DETAILS: {
if (status == RESPONSE_OK) {
String token1 = ((ResponseObject_ClipDetails) resp).m_token1;
String token2 = ((ResponseObject_ClipDetails) resp).m_token2;
String url = getClipURL(token1, token2);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
i.setType("video/flv");
startActivity(i);
}
}
break;
}
}
有没有一种方式来显示FLV的视频在我的Android应用程序?
is there a way to show .flv videos in my android app?
推荐答案
这个链接可能对您有所帮助。
This link might be helpful to you.
<一个href="http://stackoverflow.com/questions/6596243/problem-to-load-flv-video-in-webview/6855609#6855609">Problem加载FLV视频
这篇关于安卓:打从URL FLV视频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!