相关疑难解决方法(0)

RTSP youtube链接

我已经遍布谷歌,我很难从youtube视频获取rtsp链接给出VIDEO_ID.

我很困惑如何使用该ID,然后解析谷歌的链接.

感谢您的时间和精力.

youtube android rtsp

12
推荐指数
2
解决办法
3万
查看次数

在Android网页视图中通过iframe加载Youtube视频

我想使用iframe将youtube视频加载到Android webview

这是我的布局Xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white"
android:id="@+id/mainLayout">

<WebView
    android:background="@android:color/white"
    android:id="@+id/webView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

我的代码是:

public class WebTube extends Activity {

private WebView wv;

String html = "<iframe class=\"youtube-player\" style=\"border: 0; width: 100%; height: 95%; padding:0px; margin:0px\" id=\"ytplayer\" type=\"text/html\" src=\"http://www.youtube.com/embed/WBYnk3zR0os"
            + "?fs=0\" frameborder=\"0\">\n"
            + "</iframe>";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_main);

    wv = (WebView)findViewById(R.id.webView); 
    wv.getSettings().setJavaScriptEnabled(true);
        wv.loadDataWithBaseURL("", html , "text/html",  "UTF-8", "");

     }
} 
Run Code Online (Sandbox Code Playgroud)

我也提供 <uses-permission android:name="android.permission.INTERNET"/>

& android:hardwareAccelerated="true"

当我运行这个时,我没有得到任何结果它只是显示黑屏

我试过这个.但是这给我提供了视频.3gp Quality.但是我需要来自youtube的原始质量的视频.这就是我使用的原因 …

youtube iframe android android-webview

12
推荐指数
2
解决办法
4万
查看次数

如何获得RTSP链接Android

我有你的链接,如http://www.youtube.com/v/YR71GnQ4CU4?f=videos&app=youtube_gdata,然后如何将其转换为RTSP格式在VideoView中播放.

我用这个搜索gdata api:http://gdata.youtube.com/feeds/api/videos?&max-results = 20&v = 2&format = 1&q ="+ URLEncoder.encode(activity.criteria)但我找不到如何获得相关的RTSP网址.

youtube android rtsp android-videoview

8
推荐指数
1
解决办法
2万
查看次数