Added embedded audio player

This commit is contained in:
M66B
2024-01-23 09:00:06 +01:00
parent 0474a73b4a
commit 1089513888
10 changed files with 168 additions and 12 deletions

View File

@@ -2308,6 +2308,10 @@ public class Helper {
}
static String formatDuration(long ms) {
return formatDuration(ms, true);
}
static String formatDuration(long ms, boolean withFraction) {
int sign = (ms < 0 ? -1 : 1);
ms = Math.abs(ms);
int days = (int) (ms / (24 * 3600 * 1000L));
@@ -2317,7 +2321,7 @@ public class Helper {
return (sign < 0 ? "-" : "") +
(days > 0 ? days + " " : "") +
DateUtils.formatElapsedTime(seconds) +
(ms == 0 ? "" : "." + ms);
(ms == 0 || !withFraction ? "" : "." + ms);
}
static String formatNumber(Integer number, long max, NumberFormat nf) {