Skip to content

Instantly share code, notes, and snippets.

@atroche
Created May 16, 2019 06:45
Show Gist options
  • Save atroche/a4624afad4c98e4549b4b9372e5337e2 to your computer and use it in GitHub Desktop.
Save atroche/a4624afad4c98e4549b4b9372e5337e2 to your computer and use it in GitHub Desktop.
// NOTE: files other than m4a are probably streamable but we can only generate waveforms for m4a
if ("audio/m4a".equals(task.getContentType()) || "audio/x-m4a".equals(task.getContentType()) || "audio/mp4".equals(task.getContentType())) {
InputStream objectContent = null;
try {
objectContent = new FileInputStream(new File(workingDir, input));
if (new FastStartChecker().check(objectContent)) {
metadata.put(META_DATA_STREAMABLE, true);
} else {
metadata.put(META_DATA_STREAMABLE, false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment