diff --git a/picture_library/src/main/java/com/luck/picture/lib/PictureSelectionModel.java b/picture_library/src/main/java/com/luck/picture/lib/PictureSelectionModel.java index 40ccb9714..35bad0334 100644 --- a/picture_library/src/main/java/com/luck/picture/lib/PictureSelectionModel.java +++ b/picture_library/src/main/java/com/luck/picture/lib/PictureSelectionModel.java @@ -1465,4 +1465,14 @@ public void externalPictureVideo(String path) { throw new NullPointerException("This PictureSelector is Null"); } } + + /** + * @param show whether to show too long and too short videos + * @return + */ + public PictureSelectionModel isShowOutLengthVideos(boolean show) { + selectionConfig.showOutLengthVideos = show; + return this; + } + } diff --git a/picture_library/src/main/java/com/luck/picture/lib/config/PictureSelectionConfig.java b/picture_library/src/main/java/com/luck/picture/lib/config/PictureSelectionConfig.java index 5756d9a15..9e86007bb 100644 --- a/picture_library/src/main/java/com/luck/picture/lib/config/PictureSelectionConfig.java +++ b/picture_library/src/main/java/com/luck/picture/lib/config/PictureSelectionConfig.java @@ -156,6 +156,7 @@ public final class PictureSelectionConfig implements Parcelable { public boolean isAndroidQChangeWH; public boolean isAndroidQChangeVideoWH; public boolean isQuickCapture; + public boolean showOutLengthVideos; /** * 内测专用########### */ @@ -265,6 +266,7 @@ protected void initDefaultValue() { isAndroidQChangeWH = true; isAndroidQChangeVideoWH = false; isQuickCapture = true; + showOutLengthVideos = false; } public static PictureSelectionConfig getInstance() { @@ -404,6 +406,7 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeByte(this.isFallbackVersion ? (byte) 1 : (byte) 0); dest.writeByte(this.isFallbackVersion2 ? (byte) 1 : (byte) 0); dest.writeByte(this.isFallbackVersion3 ? (byte) 1 : (byte) 0); + dest.writeByte(this.showOutLengthVideos ? (byte) 1 : (byte) 0); } protected PictureSelectionConfig(Parcel in) { @@ -508,6 +511,7 @@ protected PictureSelectionConfig(Parcel in) { this.isFallbackVersion = in.readByte() != 0; this.isFallbackVersion2 = in.readByte() != 0; this.isFallbackVersion3 = in.readByte() != 0; + this.showOutLengthVideos = in.readByte() != 0; } public static final Creator CREATOR = new Creator() { diff --git a/picture_library/src/main/java/com/luck/picture/lib/model/LocalMediaLoader.java b/picture_library/src/main/java/com/luck/picture/lib/model/LocalMediaLoader.java index 0d7106042..d24a6d4c8 100644 --- a/picture_library/src/main/java/com/luck/picture/lib/model/LocalMediaLoader.java +++ b/picture_library/src/main/java/com/luck/picture/lib/model/LocalMediaLoader.java @@ -394,13 +394,14 @@ private LocalMediaFolder getImageFolder(String path, String folderName, List