I have webview and some html + youtube video loaded. Is it possible to open youtube videos in youtube app instead of webview?
Asked
Active
Viewed 1,193 times
0
-
Try the accepted answer at this link: http://stackoverflow.com/a/11114413/867591 – Ahmed Faisal Jan 18 '13 at 16:49
-
@JaVAndroid I have url to some news article with youtube video embedded. So the question is - if I click on this player, how can I force it to play in youtube app, not in the same webview – Roman Jan 18 '13 at 17:41
-
Try this: String videoId = "dh6hE5uPcRM"; Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:"+videoId)); intent.putExtra("VIDEO_ID", videoId); startActivity(intent); – Ahmed Faisal Jan 18 '13 at 19:47
-
@JaVAndroid but is it possible to catch a click on youtube player? So then I could open in a new intent – Roman Jan 23 '13 at 18:24
-
1I'm not sure on that...haven't tried capturing an event from the player yet...well worth a try :) – Ahmed Faisal Jan 23 '13 at 19:01
-
@Roman did you get this solved in the end? – Andrew Weir Apr 24 '13 at 13:32
-
@AndrewWeir what happerns is that some videos are handled by Youtube app, some open in browser. Seems like depends on link structure. We agreed with the clients to leave this headache for some future update :) – Roman Apr 24 '13 at 14:03