Reputation: 245
Google Chrome for android, is able to display videos on sites such as Youtube and Twitch without any flash support. What I want to know is how Chrome does this, through a plug-in of some sort? What I also want to know is how I could replicate the results, because I've been searching for flash support or support for playing videos that normally require flash (Mainly twitch/youtube), for Java/Android, and haven't been able to find a solution.
Thanks for your help!
Upvotes: 1
Views: 575
Reputation: 519
Google Chrome for mobile does not rely on flash to play videos. Instead, it streams the videos from the site and plays them with a special player from the device.
As for replicating these results, I would recommend using a VideoView. Here is an example:
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.main);
String videourl = "http://something.com/blah.mp4";
Uri uri = Uri.parse(videourl);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setDataAndType(uri, "video/mp4");
startActivity(intent);
}
Make sure the URL is a direct link to the video. (it must end in .mp4)
Upvotes: 1
Reputation: 3174
For Flash videos there is a special format. These Files often have the file postfix .flv. There are also Players like VLC on all PC plattforms, which have the ability to encode these Files. It's just a format like mp4, avi etc. And like said before, Android devices have a special app for decoding flash videos.
Upvotes: 0