Android VideoView可以';我不玩电影

Android VideoView可以';我不玩电影,android,video,video-streaming,android-videoview,Android,Video,Video Streaming,Android Videoview,我有以下视频: ExifTool Version Number : 9.46 File Name : capturedvideo.MOV Directory : . File Size : 549 kB File Modification Date/Time : 2016:07:07 10:41:51+03:00 File Access Da

我有以下视频:

ExifTool Version Number         : 9.46
File Name                       : capturedvideo.MOV
Directory                       : .
File Size                       : 549 kB
File Modification Date/Time     : 2016:07:07 10:41:51+03:00
File Access Date/Time           : 2016:07:07 10:41:55+03:00
File Inode Change Date/Time     : 2016:07:07 10:41:51+03:00
File Permissions                : rw-rw-r--
File Type                       : MOV
MIME Type                       : video/quicktime
Major Brand                     : Apple QuickTime (.MOV/QT)
Minor Version                   : 0.0.0
Compatible Brands               : qt
Movie Data Size                 : 556049
Movie Data Offset               : 36
Movie Header Version            : 0
Create Date                     : 2016:07:06 13:45:05
Modify Date                     : 2016:07:06 13:45:10
Time Scale                      : 600
Duration                        : 5.04 s
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2016:07:06 13:45:05
Track Modify Date               : 2016:07:06 13:45:10
Track ID                        : 1
Track Duration                  : 5.04 s
Track Layer                     : 0
Track Volume                    : 100.00%
Image Width                     : 480
Image Height                    : 360
Clean Aperture Dimensions       : 480x360
Production Aperture Dimensions  : 480x360
Encoded Pixels Dimensions       : 480x360
Graphics Mode                   : ditherCopy
Op Color                        : 32768 32768 32768
Compressor ID                   : avc1
Source Image Width              : 480
Source Image Height             : 360
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : H.264
Bit Depth                       : 24
Video Frame Rate                : 29.98
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2016:07:06 13:45:05
Media Modify Date               : 2016:07:06 13:45:10
Media Time Scale                : 44100
Media Duration                  : 5.09 s
Media Language Code             : und
Balance                         : 0
Handler Class                   : Data Handler
Handler Vendor ID               : Apple
Handler Description             : Core Media Data Handler
Audio Format                    : mp4a
Audio Channels                  : 1
Audio Bits Per Sample           : 16
Audio Sample Rate               : 44100
Purchase File Format            : mp4a
Handler Type                    : Metadata Tags
Make                            : Apple
Software                        : 9.3.2
Model                           : iPhone 5c
Creation Date                   : 2016:07:06 16:45:05+03:00
Avg Bitrate                     : 883 kbps
Image Size                      : 480x360
Rotation                        : 90
它在iOS和浏览器上播放,压缩为H.264,Android()应支持该压缩 我试着玩它

final MediaController mediacontroller = new MediaController(getContext());
                mediacontroller.setAnchorView(mVideoView);
                mVideoView.setZOrderOnTop(true);
                mVideoView.setVideoURI(Uri.parse(videoURL));
                mVideoView.setMediaController(mediacontroller);
                mVideoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                    @Override
                    public void onPrepared(MediaPlayer mp) {
                        mVideoView.start();
                        mediacontroller.show(2000);
                    }
                });
使用上面的代码:播放ok

编辑: 现在,我将此用作播放电影的变通方法:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(video.Url));
                intent.setDataAndType(Uri.parse(video.Url), "video/mp4");
                context.startActivity(intent);

android的视频视图不支持.mov扩展。如果您有特殊要求,请使用ffmpeg android将其转换为.mp4扩展。android的视频视图不支持.mov扩展。如果您有特殊要求,请使用ffmpeg android将其转换为.mp4扩展。