-1

I need to display real time video stream from laptop camera to android app. Because i don't know how to stream video so i use youtube to stream video for me and it works fine. Now i need to dis play a stream video from youtube to android app. Current i'm using videoview so i need get direct link of stream link ( for youtube video i can use this YouTubeExtractor ) but this library doesn't work for stream link. How can i do the same with stream link ?

gw0
  • 2,513
  • 2
  • 23
  • 37
  • I use YouTubeExtractor too and thats working for me, maybe can share your implement code? – Sodiq Oct 24 '16 at 19:17

2 Answers2

0

Try something like this:

public static void watchYoutubeVideo(String id){
Intent appIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:" + id));
Intent webIntent = new Intent(Intent.ACTION_VIEW,
            Uri.parse("http://www.youtube.com/watch?v=" + id));
try {
    startActivity(appIntent);
} catch (ActivityNotFoundException ex) {
    startActivity(webIntent);
}
} 

Android YouTube app Play Video Intent

Community
  • 1
  • 1
0

Use the YouTube Android Player API , it allows you to play any youtube video, given the video id that you can extract from any youtube link.

Merlevede
  • 8,078
  • 1
  • 23
  • 39