Hello i have a video application such that all the videos exist on Youtube
. now Google
says in their IO that the Youtube API
for android
will be available soon . that was 2.5 months ago . any how , i have a Html5
player using javascript
plus a flash player for YouTube
, but HTML5
does not work on all devices and the flash
player wont work on Android
4.0 and up . is there a way to play the video within the app and support all devices !!
Asked
Active
Viewed 2,601 times
4

user4o01
- 2,688
- 4
- 39
- 54
2 Answers
0
You could launch an Intent to launch the built-in Youtube app:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:"+ YOUR_VIDEO_ID));
startActivity(intent);

Givi
- 3,283
- 4
- 20
- 23
-
okey @Yuval ,you haven't read the question probably but i tried this approach it takes 2 seconds to open the Youtube app . – user4o01 Oct 02 '12 at 12:25
-
Open the YouTube app is not that slow. I think @user4o01 should use the solution above. – Magakahn Oct 10 '12 at 12:45
0
I tried the following while programming for browsers: Create a HTML5 video using this example: Video For Everybody
If you look at that, at the end you see when all sources arent supported, it will take a flash file. If that also doesnt work you could try to use a library as a fallback option even after the flash in that example. I am not sure (little experience with programming for android) but if the sources, flash and javascript/other libraries dont work... I dont know. Sorry :)
Possibly you could use a pure javascript solution?
I hope you can get a bit further with my answer, although it could very well be known to you already.
Take care!

WhoKnows
- 100
- 1
- 11