Skip to content

Commit 79c326c

Browse files
committed
Handle audio files in media browser
Fix #2474
1 parent 7614498 commit 79c326c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/MediaUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ public static boolean isVideo(String url) {
7171
url.endsWith(".3g2");
7272
}
7373

74+
public static boolean isAudio(String url) {
75+
if (url == null) {
76+
return false;
77+
}
78+
return url.endsWith(".mp3") || url.endsWith(".ogg") || url.endsWith(".wav");
79+
}
80+
7481
/**
7582
* E.g. Jul 2, 2013 @ 21:57
7683
*/

0 commit comments

Comments
 (0)