# MediaUtils

public class MediaUtils

## Constructors

MediaUtils
Link copied to clipboard
public void MediaUtils()

## Functions

createImageUri
Link copied to clipboard
public static Uri createImageUri(Context context)
创建一条图片地址uri,用于保存拍照后的照片
createVideoUri
Link copied to clipboard
public static Uri createVideoUri(Context context)
创建一条视频地址uri,用于保存录制的视频
extractDuration
Link copied to clipboard
public static long extractDuration(Context context, boolean isAndroidQ, String path)
获取视频时长
getLastImageId
Link copied to clipboard
@Deprecated()
public static int getLastImageId(Context context, String mimeType)
获取DCIM文件下最新一条拍照记录
getLocalImageSizeToAndroidQ
Link copied to clipboard
public static Array<int> getLocalImageSizeToAndroidQ(Context context, String videoPath)
get Local image width or height for api 29
getLocalImageWidthOrHeight
Link copied to clipboard
public static Array<int> getLocalImageWidthOrHeight(String imagePath)
get Local image width or height
getLocalSizeToAndroidQ
Link copied to clipboard
@Deprecated()
public static Array<int> getLocalSizeToAndroidQ(Context context, String videoPath)
get Local video width or height for api 29
getLocalVideoSize
Link copied to clipboard
public static Array<int> getLocalVideoSize(String videoPath)
public static Array<int> getLocalVideoSize(Context context, Uri uri)
get Local video width or height
isLongImg
Link copied to clipboard
public static boolean isLongImg(LocalMedia media)
是否是长图