mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
feat(server): Support webm videos (#1365)
* feat(server): Support webm without transcoding. Transcoding result doesn't appear to be used by anything expect for quicktime. * feat(server): Fix the asset uploader for .avi It needs to be transcoded. * feat(server): Most browsers doesn't support avi so use mp4. * feat(server): Address PR comments * Addressed the PR comments I moved the function that checks the mimetype to a central location in asset-utils and made tests for it. * Rollbacked to the way transcoder was decising things to transcode.
This commit is contained in:
committed by
GitHub
parent
5262e92b9f
commit
8eb82836b9
20
server/libs/common/src/utils/asset-utils.spec.ts
Normal file
20
server/libs/common/src/utils/asset-utils.spec.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { assetUtils } from './asset-utils';
|
||||
|
||||
describe('Asset Utilities', () => {
|
||||
describe('isWebPlayable', () => {
|
||||
it('Check that it returns true with mimetype webm', () => {
|
||||
const result = assetUtils.isWebPlayable('video/webm');
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('Check that returns true with mimetype mp4', () => {
|
||||
const result = assetUtils.isWebPlayable('video/mp4');
|
||||
expect(result).toBeTruthy();
|
||||
});
|
||||
|
||||
it('Check that returns false with mimetype quicktime', () => {
|
||||
const result = assetUtils.isWebPlayable('video/quicktime');
|
||||
expect(result).toBeFalsy();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user