简体   繁体   中英

How to play mp4 video files, android

I tried the following code. But unable to play mp4 files using ACTION_VIEW. But I am able to play m4v files. How to play mp4 files.

            Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
            Uri data = Uri.parse(filePath);
            intent.setDataAndType(data, "video/*");
            startActivity(intent);

Thanks Sunil Kumar Sahoo

I found the issue is with streaming of video file with certain file types. http://developer.android.com/guide/appendix/media-formats.html

I found the alternate solution as to down fiel into sdcard and then play the file from SD-Card

Thanks Sunil Kumar Sahoo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM