MediaMetadataRetriever retr = new MediaMetadataRetriever();
retr.setDataSource(mVideoPath);
String rotation = retr.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
只找到上述代码在API 17 之后可以使用,那API 17之前该如何获取视频的方向?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
API 14可以获取长宽,如果需要更低的版本只能自己实现了,但是源码里面是native的代码,所以只能考虑用一些第三方播放器使用了,比如Vitamio 这个也有MediaMetadataRetriever 支持到2.1的版本