Couldn't open file on client side, trying server side Error in Android

后端 未结 3 1146
面向向阳花
面向向阳花 2020-12-17 18:23

I have tried to play a youtube video by its URL by my android program. I have used setVideoURI(uri); function also to set URI, as suggested by other POSTs in stackoverflow

3条回答
  •  无人及你
    2020-12-17 18:55

    Once you get the You tube url..., Substring the Video_ID from the Url.See the example below i have given.

    once you get the rtsp link you can play video in VideoView Here is example.

    For example: If this link is the video http://www.youtube.com/watch?v=E43mgXNl0xc

    Then E43mgXNl0xc is the Video_ID.

    Use this video id to play video in videoview.

    Refer these two links:

    Link 1

    Link 2

    Once you get the rtsp link you can play it in VideoView.

    Also check my answer Here.

提交回复
热议问题