mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): buffering for video player (#520)
* fix(web): buffering for video player * chore(): missing file -_- * refactor(web): using URL builder * chore(): add semicolon * fix(web): video player * remove deadcode Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
3b55cdc0be
commit
fb0fa742f5
4 changed files with 67 additions and 95 deletions
12
web/src/api/utils.ts
Normal file
12
web/src/api/utils.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
let _basePath = '/api';
|
||||
|
||||
export function getFileUrl(aid: string, did: string, isThumb?: boolean, isWeb?: boolean) {
|
||||
const urlObj = new URL(`${window.location.origin}${_basePath}/asset/file`);
|
||||
|
||||
urlObj.searchParams.append('aid', aid);
|
||||
urlObj.searchParams.append('did', did);
|
||||
if (isThumb !== undefined && isThumb !== null) urlObj.searchParams.append('isThumb', `${isThumb}`);
|
||||
if (isWeb !== undefined && isWeb !== null) urlObj.searchParams.append('isWeb', `${isWeb}`);
|
||||
|
||||
return urlObj.href;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue